This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

CreateFile in pwdgrp.h


2002-10-24  Pierre Humblet <pierre.humblet@ieee.org>

	* pwdgrp.h (pwdgrp_read::open): Compare fh to INVALID_HANDLE_VALUE.

--- pwdgrp.h.orig       2002-10-24 00:04:06.000000000 -0400
+++ pwdgrp.h    2002-10-24 00:04:38.000000000 -0400
@@ -71,7 +71,7 @@ public:
 
     fh = CreateFile (pc, GENERIC_READ, wincap.shared (), NULL, OPEN_EXISTING,
                     FILE_ATTRIBUTE_NORMAL, 0);
-    if (fh)
+    if (fh != INVALID_HANDLE_VALUE)
       {
        DWORD size = GetFileSize (fh, NULL), read_bytes;
        buf = (char *) malloc (size + 1);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]