mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-28 15:46:52 +00:00
util/cutils: Rename qemu_strtoll(), qemu_strtoull()
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(). Backports commit b30d188677456b17c1cd68969e08ddc634cef644 from qemu
This commit is contained in:
parent
ac34d92d09
commit
41c2e1168f
|
@ -126,9 +126,9 @@ int qemu_strtol(const char *nptr, const char **endptr, int base,
|
|||
long *result);
|
||||
int qemu_strtoul(const char *nptr, const char **endptr, int base,
|
||||
unsigned long *result);
|
||||
int qemu_strtoll(const char *nptr, const char **endptr, int base,
|
||||
int64_t *result);
|
||||
int qemu_strtoull(const char *nptr, const char **endptr, int base,
|
||||
int qemu_strtoi64(const char *nptr, const char **endptr, int base,
|
||||
int64_t *result);
|
||||
int qemu_strtou64(const char *nptr, const char **endptr, int base,
|
||||
uint64_t *result);
|
||||
/*
|
||||
* qemu_strtosz() suffixes used to specify the default treatment of an
|
||||
|
|
|
@ -705,7 +705,7 @@ static int qdict_is_list(QDict *maybe_list, Error **errp)
|
|||
for (ent = qdict_first(maybe_list); ent != NULL;
|
||||
ent = qdict_next(maybe_list, ent)) {
|
||||
|
||||
if (qemu_strtoll(ent->key, NULL, 10, &val) == 0) {
|
||||
if (qemu_strtoi64(ent->key, NULL, 10, &val) == 0) {
|
||||
if (is_list == -1) {
|
||||
is_list = 1;
|
||||
} else if (!is_list) {
|
||||
|
|
|
@ -321,8 +321,8 @@ 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,
|
||||
int64_t *result)
|
||||
int qemu_strtoi64(const char *nptr, const char **endptr, int base,
|
||||
int64_t *result)
|
||||
{
|
||||
char *p;
|
||||
int err = 0;
|
||||
|
@ -345,7 +345,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;
|
||||
|
|
Loading…
Reference in a new issue