* src/useradd.c: Set errno to 0 before calling strtol.

This commit is contained in:
nekral-guest committed 2009-04-05 22:02:50 +00:00
1 parent 2a3b84b888
commit a1cac18ac3
2 files changed
+5

No files matched your search

+1
View File
@@ -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,