cutils: Simplify how parse_uint() checks for whitespace

Use qemu_isspace() so we don't have to cast to unsigned char.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190514180311.16028-7-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
Markus Armbruster 2019-05-14 20:03:11 +02:00
parent 33c846efa2
commit db3d11ee3f

View File

@ -683,7 +683,7 @@ int parse_uint(const char *s, unsigned long long *value, char **endptr,
}
/* make sure we reject negative numbers: */
while (isspace((unsigned char)*s)) {
while (qemu_isspace(*s)) {
s++;
}
if (*s == '-') {