mirror of https://gerrit.osmocom.org/libosmocore
fix isdigit taking unsigned as input
gcc complains because our char might or might not be signed depending on arch and phase of the moon: error: array subscript has type 'char' [-Werror=charsubscripts] Change-Id: I7c76f9a2318c4f0e5eedeea00ec380824b86567e
This commit is contained in:
parent
3a22173892
commit
79f2903788
|
@ -1250,7 +1250,7 @@ int osmo_float_str_to_int(int64_t *val, const char *str, unsigned int precision)
|
||||||
if (point)
|
if (point)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
point = p;
|
point = p;
|
||||||
} else if (!isdigit(*p))
|
} else if (!isdigit((unsigned char)*p))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue