* src/useradd.c: Set errno to 0 before calling strtol.
This commit is contained in:
parent
2a3b84b888
commit
a1cac18ac3
@ -1,3 +1,7 @@
|
||||
2009-04-05 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/useradd.c: Set errno to 0 before calling strtol.
|
||||
|
||||
2009-04-05 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* libmisc/isexpired.c: If there are no shadow entry, there is no
|
||||
|
@ -286,6 +286,7 @@ static long get_number (const char *numstr)
|
||||
long val;
|
||||
char *endptr;
|
||||
|
||||
errno = 0;
|
||||
val = strtol (numstr, &endptr, 10);
|
||||
if (('\0' == *numstr) || ('\0' != *endptr) || (ERANGE == errno)) {
|
||||
fprintf (stderr,
|
||||
|
Loading…
Reference in New Issue
Block a user