[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110364: Fix test for invalid handle
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110364: Fix test for invalid handle in w32.c's 'utime'. |
Date: |
Thu, 04 Oct 2012 22:07:45 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110364
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Thu 2012-10-04 22:07:45 +0200
message:
Fix test for invalid handle in w32.c's 'utime'.
src/w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
see whether CreateFile failed.
modified:
src/ChangeLog
src/w32.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-10-04 07:23:35 +0000
+++ b/src/ChangeLog 2012-10-04 20:07:45 +0000
@@ -1,3 +1,8 @@
+2012-10-04 Eli Zaretskii <address@hidden>
+
+ * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
+ see whether CreateFile failed.
+
2012-10-04 Paul Eggert <address@hidden>
* profiler.c (handle_profiler_signal): Inhibit pending signals too,
=== modified file 'src/w32.c'
--- a/src/w32.c 2012-09-30 21:36:42 +0000
+++ b/src/w32.c 2012-10-04 20:07:45 +0000
@@ -3954,7 +3954,7 @@
/* 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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110364: Fix test for invalid handle in w32.c's 'utime'.,
Eli Zaretskii <=