summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-28 23:22:01 +0000
committerDan Gohman <gohman@apple.com>2009-07-28 23:22:01 +0000
commit367006523ae4240f20aabddce3c415ea37650bfb (patch)
tree40426ff35f5eba132d42c21b30c7754cb38d8ffa /llvm/lib/System/Unix
parentbce7a27d222ac49e229c06649111735c1022b239 (diff)
downloadbcm5719-llvm-367006523ae4240f20aabddce3c415ea37650bfb.tar.gz
bcm5719-llvm-367006523ae4240f20aabddce3c415ea37650bfb.zip
It isn't necessary to use F_OK when using R_OK or similar.
llvm-svn: 77392
Diffstat (limited to 'llvm/lib/System/Unix')
-rw-r--r--llvm/lib/System/Unix/Path.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/System/Unix/Path.inc b/llvm/lib/System/Unix/Path.inc
index e951fa03557..27765c8b6aa 100644
--- a/llvm/lib/System/Unix/Path.inc
+++ b/llvm/lib/System/Unix/Path.inc
@@ -431,12 +431,12 @@ Path::isDirectory() const {
bool
Path::canRead() const {
- return 0 == access(path.c_str(), F_OK | R_OK );
+ return 0 == access(path.c_str(), R_OK);
}
bool
Path::canWrite() const {
- return 0 == access(path.c_str(), F_OK | W_OK );
+ return 0 == access(path.c_str(), W_OK);
}
bool
OpenPOWER on IntegriCloud