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>2003-08-17 21:50:40 +0400
committerCorinna Vinschen <corinna@vinschen.de>2003-08-17 21:50:40 +0400
commit981f9625f313573ed6560d992baa57b1fdac0d57 (patch)
tree140fcb76f944b8ec739ca909de17555f63bfe5fa /winsup/cygwin
parent919497ee6bde1f6c1e8b1504b7dc7131779e8ce4 (diff)
* grp.cc (read_group): Revert previous change.
* uinfo.cc (pwdgrp::load): Always reset curr_lines.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/grp.cc5
-rw-r--r--winsup/cygwin/uinfo.cc2
3 files changed, 7 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index b8eca83c3..be9f2eb96 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-17 Pierre Humblet <pierre.humblet@ieee.org>
+
+ * grp.cc (read_group): Revert previous change.
+ * uinfo.cc (pwdgrp::load): Always reset curr_lines.
+
2003-08-17 Corinna Vinschen <corinna@vinschen.de>
* errno.cc (errmap): Map ERROR_INVALID_BLOCK_LENGTH to EIO.
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
index 5b93ec74d..c83c1e55f 100644
--- a/winsup/cygwin/grp.cc
+++ b/winsup/cygwin/grp.cc
@@ -75,10 +75,7 @@ pwdgrp::read_group ()
{
for (int i = 0; i < gr.curr_lines; i++)
if ((*group_buf)[i].gr_mem != &null_ptr)
- {
- free ((*group_buf)[i].gr_mem);
- (*group_buf)[i].gr_mem = &null_ptr;
- }
+ free ((*group_buf)[i].gr_mem);
load ("/etc/group");
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 54a7bec9a..0b106eec7 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -458,6 +458,7 @@ pwdgrp::load (const char *posix_fname)
if (buf)
free (buf);
buf = NULL;
+ curr_lines = 0;
pc.check (posix_fname);
etc_ix = etc::init (etc_ix, pc);
@@ -496,7 +497,6 @@ pwdgrp::load (const char *posix_fname)
CloseHandle (fh);
buf[read_bytes] = '\0';
char *eptr = buf;
- curr_lines = 0;
while ((eptr = add_line (eptr)))
continue;
debug_printf ("%s curr_lines %d", posix_fname, curr_lines);