Hi!

I've committed this as obvious.

2014-11-21  Jakub Jelinek  <ja...@redhat.com>

        PR sanitizer/64013
        * sanitizer_common/sanitizer_linux.cc (FileExists): Cherry pick
        upstream r222532.

--- libsanitizer/sanitizer_common/sanitizer_linux.cc    (revision 222531)
+++ libsanitizer/sanitizer_common/sanitizer_linux.cc    (revision 222532)
@@ -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() {

        Jakub

Reply via email to