提交 db3d11ee 编写于 作者: M Markus Armbruster

cutils: Simplify how parse_uint() checks for whitespace

Use qemu_isspace() so we don't have to cast to unsigned char.
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Message-Id: <20190514180311.16028-7-armbru@redhat.com>
Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
上级 33c846ef
...@@ -683,7 +683,7 @@ int parse_uint(const char *s, unsigned long long *value, char **endptr, ...@@ -683,7 +683,7 @@ int parse_uint(const char *s, unsigned long long *value, char **endptr,
} }
/* make sure we reject negative numbers: */ /* make sure we reject negative numbers: */
while (isspace((unsigned char)*s)) { while (qemu_isspace(*s)) {
s++; s++;
} }
if (*s == '-') { if (*s == '-') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册