]> git.eshelyaron.com Git - emacs.git/commitdiff
* lread.c (Fload): Don't compare a possibly-garbage time_t value.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2011 05:18:27 +0000 (22:18 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Jun 2011 05:18:27 +0000 (22:18 -0700)
src/ChangeLog
src/lread.c

index 973f9c1b2a654b297fc36e37e6eab90ef343d4ef..a9d47ebca16fb3be219bdb353ff703c926fe9770 100644 (file)
@@ -1,5 +1,7 @@
 2011-06-13  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * lread.c (Fload): Don't compare a possibly-garbage time_t value.
+
        GLYPH_CODE_FACE returns EMACS_INT, not int.
        * dispextern.h (merge_faces):
        * xfaces.c (merge_faces):
index 0426cd4d54870ad57e98c723a7ff637dc570552f..b789457b223144334e290d3cf43558ca362169ba 100644 (file)
@@ -1203,10 +1203,13 @@ Return t if the file exists and loads successfully.  */)
 #ifdef DOS_NT
          fmode = "rb";
 #endif /* DOS_NT */
-         stat (SSDATA (efound), &s1);
-         SSET (efound, SBYTES (efound) - 1, 0);
-         result = stat (SSDATA (efound), &s2);
-         SSET (efound, SBYTES (efound) - 1, 'c');
+         result = stat (SSDATA (efound), &s1);
+         if (result == 0)
+           {
+             SSET (efound, SBYTES (efound) - 1, 0);
+             result = stat (SSDATA (efound), &s2);
+             SSET (efound, SBYTES (efound) - 1, 'c');
+           }
 
          if (result == 0 && s1.st_mtime < s2.st_mtime)
            {