mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
util/cutils: New qemu_strtosz()
Most callers of qemu_strtosz_suffix() pass QEMU_STRTOSZ_DEFSUFFIX_B. Capture the pattern in new qemu_strtosz(). Inline qemu_strtosz_suffix() into its only remaining caller. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1487708048-2131-17-git-send-email-armbru@redhat.com>
This commit is contained in:
@ -140,7 +140,7 @@ static int64_t cvtnum(const char *s)
|
||||
char *end;
|
||||
int64_t ret;
|
||||
|
||||
ret = qemu_strtosz_suffix(s, &end, QEMU_STRTOSZ_DEFSUFFIX_B);
|
||||
ret = qemu_strtosz(s, &end);
|
||||
if (*end != '\0') {
|
||||
/* Detritus at the end of the string */
|
||||
return -EINVAL;
|
||||
|
Reference in New Issue
Block a user