cosmetic fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2176 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2004-12-08 04:00:26 +00:00
parent eae97caa83
commit 32085a88e8
1 changed files with 4 additions and 0 deletions

View File

@ -101,11 +101,15 @@ bool parse_num(const char *str, ssize_t *val)
ssize_t j; ssize_t j;
assert(str != NULL); assert(str != NULL);
j = (ssize_t)strtol(str, &first_error, 10); j = (ssize_t)strtol(str, &first_error, 10);
if (errno == ERANGE || *str == '\0' || *first_error != '\0') if (errno == ERANGE || *str == '\0' || *first_error != '\0')
return FALSE; return FALSE;
if (val != NULL) if (val != NULL)
*val = j; *val = j;
return TRUE; return TRUE;
} }