From e8dd48ac0902858107fadf65c85e96254220615f Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Fri, 24 Apr 2009 23:27:12 +0000 Subject: [PATCH] * lib/getlong.c: Do not check for NULL string but empty string. --- ChangeLog | 4 ++++ lib/getlong.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 86596f25..cd1e0f6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-04-25 Nicolas François + + * lib/getlong.c: Do not check for NULL string but empty string. + 2009-04-25 Nicolas François * lib/groupio.c: Updated splint annotations. diff --git a/lib/getlong.c b/lib/getlong.c index 367ae9f8..47c3a605 100644 --- a/lib/getlong.c +++ b/lib/getlong.c @@ -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; }