Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-10-24 18:33:13 +0400
committerChristopher Faylor <me@cgf.cx>2002-10-24 18:33:13 +0400
commit950a7601d1d4eb6ae308641e25c8ef14a7c7c471 (patch)
tree988a1d5a5c8a1ee8d9bbe2570c81258697f25a1f
parenta8ab20942e684c3a3061c39bafcb2694ef99f51b (diff)
* pwdgrp.h (pwdgrp_read::open): Compare fh to INVALID_HANDLE_VALUE.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/pwdgrp.h4
2 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index c5ab98a42..8983a8e61 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2002-10-24 Pierre Humblet <pierre.humblet@ieee.org>
+
+ * pwdgrp.h (pwdgrp_read::open): Compare fh to INVALID_HANDLE_VALUE.
+
2002-10-22 Christopher Faylor <cgf@redhat.com>
* fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Nevermind.
@@ -113,7 +117,6 @@
* shared.cc (open_shared): Remove reserving of memory since previous
change eliminate the need for this hack.
-
2002-10-19 Christopher Faylor <cgf@redhat.com>
* fork.cc (fork_child): Move pinfo fixup later to attempt some minor
diff --git a/winsup/cygwin/pwdgrp.h b/winsup/cygwin/pwdgrp.h
index 530adf63a..75de89fbe 100644
--- a/winsup/cygwin/pwdgrp.h
+++ b/winsup/cygwin/pwdgrp.h
@@ -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);
@@ -84,7 +84,7 @@ public:
fh = NULL;
return false;
}
- buf[read_bytes] = '\0';
+ buf[read_bytes] = '\0';
return true;
}
return false;