* src/useradd.c: Set errno to 0 before calling strtol.
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user