[compiler-rt] r222532 - sanitizer_common: fix function w/o return

Dmitry Vyukov dvyukov at google.com
Fri Nov 21 05:55:20 PST 2014


Author: dvyukov
Date: Fri Nov 21 07:55:19 2014
New Revision: 222532

URL: http://llvm.org/viewvc/llvm-project?rev=222532&view=rev
Log:
sanitizer_common: fix function w/o return
When SANITIZER_USES_CANONICAL_LINUX_SYSCALLS the function misses return statement.


Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=222532&r1=222531&r2=222532&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Fri Nov 21 07:55:19 2014
@@ -283,17 +283,15 @@ uptr internal_execve(const char *filenam
 
 // ----------------- sanitizer_common.h
 bool FileExists(const char *filename) {
-#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
   struct stat st;
+#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
   if (internal_syscall(SYSCALL(newfstatat), AT_FDCWD, filename, &st, 0))
-    return false;
 #else
-  struct stat st;
   if (internal_stat(filename, &st))
+#endif
     return false;
   // Sanity check: filename is a regular file.
   return S_ISREG(st.st_mode);
-#endif
 }
 
 uptr GetTid() {





More information about the llvm-commits mailing list