diff options
author | Christopher Faylor <me@cgf.cx> | 2003-01-27 00:31:30 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-01-27 00:31:30 +0000 |
commit | 03dba1defaeafd71941abef2e13330c43a24c212 (patch) | |
tree | 9763303a92a6011f8679304342f15eb3e4ec28cd /winsup | |
parent | fea48988ea866e6ef4f29247a13a8b28eb9be7ce (diff) | |
download | newlib-03dba1defaeafd71941abef2e13330c43a24c212.zip newlib-03dba1defaeafd71941abef2e13330c43a24c212.tar.gz newlib-03dba1defaeafd71941abef2e13330c43a24c212.tar.bz2 |
* uinfo.cc (pwdgrp::next_num): Remove check for NULL since it is no longer a
valid return from next_str.
(pwdgrp::add_line): Duh. Revert to use strchr.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/uinfo.cc | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b965d82..488eea1 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2003-01-26 Christopher Faylor <cgf@redhat.com> + * uinfo.cc (pwdgrp::next_num): Remove check for NULL since it is no + longer a valid return from next_str. + (pwdgrp::add_line): Duh. Revert to use strchr. + +2003-01-26 Christopher Faylor <cgf@redhat.com> + * strings.h (strechr): New function. * uinfo.cc (pwdgrp::next_str): Search only for input char in string. Return EOS on failure. Don't check for NULL since it shouldn't be diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index a6831e2..784130f 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -405,8 +405,6 @@ bool pwdgrp::next_num (unsigned long& n) { char *p = next_str (':'); - if (!p) - return -1; char *cp; n = strtoul (p, &cp, 10); return p != cp && !*cp; @@ -418,8 +416,8 @@ pwdgrp::add_line (char *eptr) if (eptr) { lptr = eptr; - eptr = strechr (lptr, '\n'); - if (*eptr) + eptr = strchr (lptr, '\n'); + if (eptr) { if (eptr > lptr && eptr[-1] == '\r') eptr[-1] = '\0'; |