summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/DataBufferMemoryMap.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2011-07-08 00:38:03 +0000
committerJason Molenda <jmolenda@apple.com>2011-07-08 00:38:03 +0000
commitd9761cd4662c058951945250fb5a0c5973890a9e (patch)
treedf714e819a09378178b3a94b1a4c277f0df08c0c /lldb/source/Core/DataBufferMemoryMap.cpp
parent8ccd65842db2fcf6d72cda3dc58a5dc6fdd7d5d2 (diff)
downloadbcm5719-llvm-d9761cd4662c058951945250fb5a0c5973890a9e.tar.gz
bcm5719-llvm-d9761cd4662c058951945250fb5a0c5973890a9e.zip
Switch to using the S_ISDIR and S_ISREG sys/stat.h macros in
CommandCompletions.cpp and DataBufferMemoryMap.cpp. The file type part of the st_mode struct member is not a bitmask. llvm-svn: 134669
Diffstat (limited to 'lldb/source/Core/DataBufferMemoryMap.cpp')
-rw-r--r--lldb/source/Core/DataBufferMemoryMap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Core/DataBufferMemoryMap.cpp b/lldb/source/Core/DataBufferMemoryMap.cpp
index cf88f34c38e..dfeced0b025 100644
--- a/lldb/source/Core/DataBufferMemoryMap.cpp
+++ b/lldb/source/Core/DataBufferMemoryMap.cpp
@@ -158,7 +158,7 @@ DataBufferMemoryMap::MemoryMapFromFileDescriptor (int fd,
struct stat stat;
if (::fstat(fd, &stat) == 0)
{
- if ((stat.st_mode & S_IFREG) && (stat.st_size > offset))
+ if (S_ISREG(stat.st_mode) && (stat.st_size > offset))
{
const size_t max_bytes_available = stat.st_size - offset;
if (length == SIZE_MAX)
OpenPOWER on IntegriCloud