[llvm-commits] [llvm] r77392 - /llvm/trunk/lib/System/Unix/Path.inc

Dan Gohman gohman at apple.com
Tue Jul 28 16:22:02 PDT 2009


Author: djg
Date: Tue Jul 28 18:22:01 2009
New Revision: 77392

URL: http://llvm.org/viewvc/llvm-project?rev=77392&view=rev
Log:
It isn't necessary to use F_OK when using R_OK or similar.

Modified:
    llvm/trunk/lib/System/Unix/Path.inc

Modified: llvm/trunk/lib/System/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Path.inc?rev=77392&r1=77391&r2=77392&view=diff

==============================================================================
--- llvm/trunk/lib/System/Unix/Path.inc (original)
+++ llvm/trunk/lib/System/Unix/Path.inc Tue Jul 28 18:22:01 2009
@@ -431,12 +431,12 @@
 
 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





More information about the llvm-commits mailing list