From: Dan Gohman Date: Tue, 28 Jul 2009 23:22:01 +0000 (+0000) Subject: It isn't necessary to use F_OK when using R_OK or similar. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=73c74ead219983323d3539b7e073774be8428059;p=oota-llvm.git 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 --- diff --git a/lib/System/Unix/Path.inc b/lib/System/Unix/Path.inc index e951fa03557..27765c8b6aa 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