From: Paul Eggert Date: Mon, 13 Jun 2011 05:18:27 +0000 (-0700) Subject: * lread.c (Fload): Don't compare a possibly-garbage time_t value. X-Git-Tag: emacs-pretest-24.0.90~104^2~548^2~30 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e5533da60e29f1cbbd7f909023f2c256bd76464c;p=emacs.git * lread.c (Fload): Don't compare a possibly-garbage time_t value. --- diff --git a/src/ChangeLog b/src/ChangeLog index 973f9c1b2a6..a9d47ebca16 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-06-13 Paul Eggert + * 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): diff --git a/src/lread.c b/src/lread.c index 0426cd4d548..b789457b223 100644 --- a/src/lread.c +++ b/src/lread.c @@ -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) {