CreateFile in pwdgrp.h

Pierre A. Humblet Pierre.Humblet@ieee.org
Wed Oct 23 21:28:00 GMT 2002


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);



More information about the Cygwin-patches mailing list