diff options
author | Christopher Faylor <me@cgf.cx> | 2002-10-24 18:33:13 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-10-24 18:33:13 +0400 |
commit | 950a7601d1d4eb6ae308641e25c8ef14a7c7c471 (patch) | |
tree | 988a1d5a5c8a1ee8d9bbe2570c81258697f25a1f /winsup/cygwin/pwdgrp.h | |
parent | a8ab20942e684c3a3061c39bafcb2694ef99f51b (diff) |
* pwdgrp.h (pwdgrp_read::open): Compare fh to INVALID_HANDLE_VALUE.
Diffstat (limited to 'winsup/cygwin/pwdgrp.h')
-rw-r--r-- | winsup/cygwin/pwdgrp.h | 4 |
1 files changed, 2 insertions, 2 deletions
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; |