[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [RFC PATCH 23/56] option: Fix type of qemu_opt_set_number()
From: |
Markus Armbruster |
Subject: |
[Qemu-block] [RFC PATCH 23/56] option: Fix type of qemu_opt_set_number() parameter @val |
Date: |
Mon, 7 Aug 2017 16:45:27 +0200 |
Parameter @val is int64_t. It's assigned to opt->value.uint, which is
uint64_t, because that's what QemuOpts integers are. Screwed up when
the function was added in commit b83c18e. Change @val to uint64_t.
Signed-off-by: Markus Armbruster <address@hidden>
---
include/qemu/option.h | 2 +-
util/qemu-option.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/qemu/option.h b/include/qemu/option.h
index f7338db..d812da4 100644
--- a/include/qemu/option.h
+++ b/include/qemu/option.h
@@ -92,7 +92,7 @@ void qemu_opt_set(QemuOpts *opts, const char *name, const
char *value,
Error **errp);
void qemu_opt_set_bool(QemuOpts *opts, const char *name, bool val,
Error **errp);
-void qemu_opt_set_number(QemuOpts *opts, const char *name, int64_t val,
+void qemu_opt_set_number(QemuOpts *opts, const char *name, uint64_t val,
Error **errp);
typedef int (*qemu_opt_loopfunc)(void *opaque,
const char *name, const char *value,
diff --git a/util/qemu-option.c b/util/qemu-option.c
index 9b1dc80..ca4f737 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -579,7 +579,7 @@ void qemu_opt_set_bool(QemuOpts *opts, const char *name,
bool val,
QTAILQ_INSERT_TAIL(&opts->head, opt, next);
}
-void qemu_opt_set_number(QemuOpts *opts, const char *name, int64_t val,
+void qemu_opt_set_number(QemuOpts *opts, const char *name, uint64_t val,
Error **errp)
{
QemuOpt *opt;
--
2.7.5
- [Qemu-block] [RFC PATCH 18/56] migration: Make parameter max-bandwidth unsigned in QAPI/QMP, (continued)
- [Qemu-block] [RFC PATCH 18/56] migration: Make parameter max-bandwidth unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 15/56] migration: Make XBZRLE cache size unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 08/56] dump: Make sizes and addresses unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 24/56] block/qcow2: Change align_offset() to operate on uint64_t, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 10/56] hmp: Make balloon's argument unsigned, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 23/56] option: Fix type of qemu_opt_set_number() parameter @val,
Markus Armbruster <=
- [Qemu-block] [RFC PATCH 07/56] cpus: Make memsave, pmemsave sizes, addresses unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
- [Qemu-block] [RFC PATCH 12/56] pc-dimm: Make size and address unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07
[Qemu-block] [RFC PATCH 29/56] block: Make BlockDirtyInfo byte count unsigned in QAPI/QMP, Markus Armbruster, 2017/08/07