Merge pull request #4926 from orbea/Wnonnull

Silence a -Wnonnull warning
This commit is contained in:
Twinaphex 2017-05-17 02:34:34 +02:00 committed by GitHub
commit e6f5270c3d

View File

@ -900,6 +900,9 @@ static bool next_string(char **_ptr, char **_str)
static bool int_string(char *str, int *val) static bool int_string(char *str, int *val)
{ {
if (!str)
return false;
char *endptr = NULL; char *endptr = NULL;
*val = (int) strtol(str, &endptr, 0); *val = (int) strtol(str, &endptr, 0);
return ((*str != '\0') && (*endptr == '\0')); return ((*str != '\0') && (*endptr == '\0'));