diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-12-20 12:46:10 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-12-20 12:46:10 +0000 |
commit | 8e5943260a8f765216674ee87ce8588cc4e7463e (patch) | |
tree | cdafe35ea56d921b7353c4df91cc9e58e7c6cc0d /util | |
parent | 48008198270e3ebcc9394401d676c54ed5ac139c (diff) | |
parent | 80bc935eaaf93e5b9a4efe97abd7c51d645f2612 (diff) |
Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-pull-request' into staging
Trivial fixes (20191218)
# gpg: Signature made Wed 18 Dec 2019 13:00:34 GMT
# gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg: issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* remotes/vivier2/tags/trivial-branch-pull-request:
qemu-doc: Remove the unused "Guest Agent" node
Revert "qemu-options.hx: Update for reboot-timeout parameter"
target/sparc: Remove old TODO file
test-keyval: Tighten test of trailing crap after size
util/cutils: Turn FIXME comment into QEMU_BUILD_BUG_ON()
monitor: Remove unused define
MAINTAINERS: Add hw/sd/ssi-sd.c in the SD section
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/cutils.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/util/cutils.c b/util/cutils.c index 2380165230..36ce712271 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -542,7 +542,7 @@ int qemu_strtoul(const char *nptr, const char **endptr, int base, * Convert string @nptr to an int64_t. * * Works like qemu_strtol(), except it stores INT64_MAX on overflow, - * and INT_MIN on underflow. + * and INT64_MIN on underflow. */ int qemu_strtoi64(const char *nptr, const char **endptr, int base, int64_t *result) @@ -557,8 +557,9 @@ int qemu_strtoi64(const char *nptr, const char **endptr, int base, return -EINVAL; } + /* This assumes int64_t is long long TODO relax */ + QEMU_BUILD_BUG_ON(sizeof(int64_t) != sizeof(long long)); errno = 0; - /* FIXME This assumes int64_t is long long */ *result = strtoll(nptr, &ep, base); return check_strtox_error(nptr, ep, endptr, errno); } @@ -581,8 +582,9 @@ int qemu_strtou64(const char *nptr, const char **endptr, int base, return -EINVAL; } + /* This assumes uint64_t is unsigned long long TODO relax */ + QEMU_BUILD_BUG_ON(sizeof(uint64_t) != sizeof(unsigned long long)); errno = 0; - /* FIXME This assumes uint64_t is unsigned long long */ *result = strtoull(nptr, &ep, base); /* Windows returns 1 for negative out-of-range values. */ if (errno == ERANGE) { |