summaryrefslogtreecommitdiff
path: root/lib/System
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
commit73c74ead219983323d3539b7e073774be8428059 (patch)
tree0661c38692f18e2837f636ac8d77b7f7f2db5e9f /lib/System
parent265d82e4c68fa30b7ff1cb650456249f7068bdd6 (diff)
downloadllvm-73c74ead219983323d3539b7e073774be8428059.tar.gz
llvm-73c74ead219983323d3539b7e073774be8428059.tar.bz2
llvm-73c74ead219983323d3539b7e073774be8428059.tar.xz
It isn't necessary to use F_OK when using R_OK or similar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77392 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r--lib/System/Unix/Path.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/System/Unix/Path.inc b/lib/System/Unix/Path.inc
index e951fa0355..27765c8b6a 100644
--- a/lib/System/Unix/Path.inc
+++ b/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