src/w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
see whether CreateFile failed.
+2012-10-04 Eli Zaretskii <eliz@gnu.org>
+
+ * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
+ see whether CreateFile failed.
+
2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
* profiler.c (handle_profiler_signal): Inhibit pending signals too,
/* Need write access to set times. */
fh = CreateFile (name, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
0, OPEN_EXISTING, 0, NULL);
- if (fh)
+ if (fh != INVALID_HANDLE_VALUE)
{
convert_from_time_t (times->actime, &atime);
convert_from_time_t (times->modtime, &mtime);