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>2003-01-26 09:02:34 +0300
committerChristopher Faylor <me@cgf.cx>2003-01-26 09:02:34 +0300
commitbdbd7fb6b9c446616197f9da32071f52d3bbd96f (patch)
tree672fc21f7d3a12e81b14cdebb3059a332e6bc0b4 /winsup/cygwin/grp.cc
parentc9133395631fb7ff2fb37df4a7ac848d1ddf19a0 (diff)
* passwd.cc (pwdgrp::parse_passwd): Eliminate use of memset. The structure
should always be completely filled out. * grp.cc (pwdgrp::parse_group): Ditto. * grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r--winsup/cygwin/grp.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
index 7d7f373a2..dc93f913c 100644
--- a/winsup/cygwin/grp.cc
+++ b/winsup/cygwin/grp.cc
@@ -36,12 +36,7 @@ static char * NO_COPY null_ptr;
bool
pwdgrp::parse_group ()
{
- char *dp;
-
# define grp (*group_buf)[curr_lines]
-
- memset (&grp, 0, sizeof (grp));
-
grp.gr_name = next_str ();
if (!*grp.gr_name)
return false;
@@ -52,7 +47,7 @@ pwdgrp::parse_group ()
return false;
int n;
- dp = raw_ptr ();
+ char *dp = raw_ptr ();
for (n = 0; *next_str (','); n++)
continue;