* 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.
This commit is contained in:
		| @@ -1,3 +1,9 @@ | ||||
| 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. | ||||
|   | ||||
| @@ -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'; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user