cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2176 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
eae97caa83
commit
32085a88e8
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue