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:
authorCorinna Vinschen <corinna@vinschen.de>2002-08-19 15:27:18 +0400
committerCorinna Vinschen <corinna@vinschen.de>2002-08-19 15:27:18 +0400
commit34f72894755ffb134d011d2a3817931c915ac47e (patch)
treed99f51acb011defa54145242ae8273d84b89f11e /winsup/cygwin
parentc060edba342decad9f5e29837a04cf82ff61b7a0 (diff)
* pwdgrp.h (pwdgrp_read::pwdgrp_read): Remove.
(pwdgrp_read::~pwdgrp_read): Ditto. (pwdgrp_read::open): Reset fh to NULL instead of INVALID_HANDLE_VALUE. (pwdgrp_read::close): Ditto.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/pwdgrp.h16
2 files changed, 10 insertions, 13 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index ddf61624a..b79a00d97 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2002-08-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * pwdgrp.h (pwdgrp_read::pwdgrp_read): Remove.
+ (pwdgrp_read::~pwdgrp_read): Ditto.
+ (pwdgrp_read::open): Reset fh to NULL instead of INVALID_HANDLE_VALUE.
+ (pwdgrp_read::close): Ditto.
+
2002-08-19 Christopher Faylor <cgf@redhat.com>
* fhandler.h (fhandler_console::send_winch_maybe): New method.
diff --git a/winsup/cygwin/pwdgrp.h b/winsup/cygwin/pwdgrp.h
index bab2da863..530adf63a 100644
--- a/winsup/cygwin/pwdgrp.h
+++ b/winsup/cygwin/pwdgrp.h
@@ -59,16 +59,6 @@ class pwdgrp_read {
char *lptr, *eptr;
public:
- pwdgrp_read ()
- : fh (INVALID_HANDLE_VALUE), buf (NULL), lptr (NULL), eptr (NULL) {}
- virtual ~pwdgrp_read ()
- {
- if (fh != INVALID_HANDLE_VALUE)
- CloseHandle (fh);
- if (buf)
- free (buf);
- }
-
bool open (const char *posix_fname)
{
if (buf)
@@ -91,7 +81,7 @@ public:
free (buf);
buf = NULL;
CloseHandle (fh);
- fh = INVALID_HANDLE_VALUE;
+ fh = NULL;
return false;
}
buf[read_bytes] = '\0';
@@ -118,8 +108,8 @@ public:
inline const char *get_fname () { return pc; }
void close ()
{
- if (fh != INVALID_HANDLE_VALUE)
+ if (fh)
CloseHandle (fh);
- fh = INVALID_HANDLE_VALUE;
+ fh = NULL;
}
};