]> sourceware.org Git - newlib-cygwin.git/commitdiff
* grp.cc (read_etc_group): Just reuse group_buf storage for subsequent reread
authorChristopher Faylor <me@cgf.cx>
Fri, 14 Sep 2001 03:01:47 +0000 (03:01 +0000)
committerChristopher Faylor <me@cgf.cx>
Fri, 14 Sep 2001 03:01:47 +0000 (03:01 +0000)
of /etc/group.
* passwd.cc (read_etc_passwd): Just reuse passwd_buf storage for subsequent
reread of /etc/passwd.

winsup/cygwin/ChangeLog
winsup/cygwin/grp.cc
winsup/cygwin/passwd.cc

index acb342047f736ea114ca6a2420356df41afb5406..6e6b28987b3eb1cf3902a77cbb2b8e611e810810 100644 (file)
@@ -1,3 +1,10 @@
+Thu Sep 13 23:01:00 2001  Christopher Faylor <cgf@cygnus.com>
+
+       * grp.cc (read_etc_group): Just reuse group_buf storage for subsequent
+       reread of /etc/group.
+       * passwd.cc (read_etc_passwd): Just reuse passwd_buf storage for
+       subsequent reread of /etc/passwd.
+
 Thu Sep 13 20:46:05 2001  Christopher Faylor <cgf@cygnus.com>
 
        * cygheap.cc (dup_now): New function.
index 62b5859658d312319426c48468dce2eb48de75b7..48a74e99c8fac36a6dea6317566d9f9d6dbc5c51 100644 (file)
@@ -152,8 +152,7 @@ read_etc_group ()
              free (group_buf[i].gr_name);
              free (group_buf[i].gr_mem);
            }
-         free (group_buf);
-         curr_lines = max_lines = 0;
+         curr_lines = 0;
        }
 
       FILE *f = fopen (etc_group, "rt");
index ed37e98ead7bde1e52d1f521fafba8abd9cbe841..87ba9c6723b06a5d476fa4f1b6ffd3e9182b26d3 100644 (file)
@@ -137,8 +137,7 @@ read_etc_passwd ()
          {
            for (int i = 0; i < curr_lines; ++i)
              free (passwd_buf[i].pw_name);
-           free (passwd_buf);
-           curr_lines = max_lines = 0;
+           curr_lines = 0;
          }
 
        FILE *f = fopen ("/etc/passwd", "rt");
This page took 0.036849 seconds and 5 git commands to generate.