From 367006523ae4240f20aabddce3c415ea37650bfb Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 28 Jul 2009 23:22:01 +0000 Subject: It isn't necessary to use F_OK when using R_OK or similar. llvm-svn: 77392 --- llvm/lib/System/Unix/Path.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/System/Unix') 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 -- cgit v1.2.3