From b30d188677456b17c1cd68969e08ddc634cef644 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 21 Feb 2017 21:13:50 +0100 Subject: util/cutils: Rename qemu_strtoll(), qemu_strtoull() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The name qemu_strtoll() suggests conversion to long long, but it actually converts to int64_t. Rename to qemu_strtoi64(). The name qemu_strtoull() suggests conversion to unsigned long long, but it actually converts to uint64_t. Rename to qemu_strtou64(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Message-Id: <1487708048-2131-7-git-send-email-armbru@redhat.com> --- util/cutils.c | 4 ++-- util/log.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'util') diff --git a/util/cutils.c b/util/cutils.c index 1ae2a08..0dc9b28 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -372,7 +372,7 @@ int qemu_strtoul(const char *nptr, const char **endptr, int base, * Works like qemu_strtol(), except it stores INT64_MAX on overflow, * and INT_MIN on underflow. */ -int qemu_strtoll(const char *nptr, const char **endptr, int base, +int qemu_strtoi64(const char *nptr, const char **endptr, int base, int64_t *result) { char *p; @@ -396,7 +396,7 @@ int qemu_strtoll(const char *nptr, const char **endptr, int base, * * Works like qemu_strtoul(), except it stores UINT64_MAX on overflow. */ -int qemu_strtoull(const char *nptr, const char **endptr, int base, +int qemu_strtou64(const char *nptr, const char **endptr, int base, uint64_t *result) { char *p; diff --git a/util/log.c b/util/log.c index e077340..96f30dd 100644 --- a/util/log.c +++ b/util/log.c @@ -183,13 +183,13 @@ void qemu_set_dfilter_ranges(const char *filter_spec, Error **errp) goto out; } - if (qemu_strtoull(r, &e, 0, &r1val) + if (qemu_strtou64(r, &e, 0, &r1val) || e != range_op) { error_setg(errp, "Invalid number to the left of %.*s", (int)(r2 - range_op), range_op); goto out; } - if (qemu_strtoull(r2, NULL, 0, &r2val)) { + if (qemu_strtou64(r2, NULL, 0, &r2val)) { error_setg(errp, "Invalid number to the right of %.*s", (int)(r2 - range_op), range_op); goto out; -- cgit v1.1