[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cygwin-patches
Subject:    CreateFile in pwdgrp.h
From:       "Pierre A. Humblet" <Pierre.Humblet () ieee ! org>
Date:       2002-10-24 4:24:30
[Download RAW message or body]


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic