diff options
author | Markus Armbruster <armbru@redhat.com> | 2017-02-21 21:14:00 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-02-23 20:35:36 +0100 |
commit | 466dea14e677555dd24465aca75d00a3537ad062 (patch) | |
tree | e1df0ed42f3bbac5bafe441aaad90b3d8ced3a3f /qapi/opts-visitor.c | |
parent | e591591b323772eea733de6027f5e8b50692d0ff (diff) |
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>
Diffstat (limited to 'qapi/opts-visitor.c')
-rw-r--r-- | qapi/opts-visitor.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c index 1048bbc84e..360d33773f 100644 --- a/qapi/opts-visitor.c +++ b/qapi/opts-visitor.c @@ -489,8 +489,7 @@ opts_type_size(Visitor *v, const char *name, uint64_t *obj, Error **errp) return; } - val = qemu_strtosz_suffix(opt->str ? opt->str : "", &endptr, - QEMU_STRTOSZ_DEFSUFFIX_B); + val = qemu_strtosz(opt->str ? opt->str : "", &endptr); if (val < 0 || *endptr) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, opt->name, "a size value representible as a non-negative int64"); |