]> granicus.if.org Git - shadow/commitdiff
* lib/getlong.c: Do not check for NULL string but empty string.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 24 Apr 2009 23:27:12 +0000 (23:27 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 24 Apr 2009 23:27:12 +0000 (23:27 +0000)
ChangeLog
lib/getlong.c

index 86596f250650719d06d9ad793a5551e402839657..cd1e0f6ae3e50be9378b7803031cdbb813ddbeb5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-25  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * lib/getlong.c: Do not check for NULL string but empty string.
+
 2009-04-25  Nicolas François  <nicolas.francois@centraliens.net>
 
        * lib/groupio.c: Updated splint annotations.
index 367ae9f898d6b4fa8e67824e16981ab8862f20dc..47c3a60529e09579f20b5be25dcf4c3e865d6d4a 100644 (file)
@@ -49,7 +49,7 @@ int getlong (const char *numstr, /*@out@*/long int *result)
 
        errno = 0;
        val = strtol (numstr, &endptr, 0);
-       if (('\0' == numstr) || ('\0' != *endptr) || (ERANGE == errno)) {
+       if (('\0' == *numstr) || ('\0' != *endptr) || (ERANGE == errno)) {
                return 0;
        }