Skip to content

Commit

Permalink
cutils: Simplify how parse_uint() checks for whitespace
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Markus Armbruster committed May 22, 2019
1 parent 33c846e commit db3d11e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/cutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 == '-') {
Expand Down

0 comments on commit db3d11e

Please sign in to comment.