This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
CreateFile in pwdgrp.h
- From: "Pierre A. Humblet" <Pierre dot Humblet at ieee dot org>
- To: cygwin-patches at cygwin dot com
- Date: Thu, 24 Oct 2002 00:24:30 -0400
- Subject: 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);