[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 01/14] qapi: make visit_type_size fallback to v->
From: |
Hu Tao |
Subject: |
[Qemu-devel] [PATCH v5 01/14] qapi: make visit_type_size fallback to v->type_int() |
Date: |
Wed, 26 Jun 2013 17:13:24 +0800 |
In case of v->type_uint64 is NULL, fallback to v->type_int, by calling
visit_type_uint64().
Signed-off-by: Vasilis Liaskovitis <address@hidden>
Signed-off-by: Hu Tao <address@hidden>
---
qapi/qapi-visit-core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c
index 401ee6e..7ae2061 100644
--- a/qapi/qapi-visit-core.c
+++ b/qapi/qapi-visit-core.c
@@ -239,7 +239,11 @@ void visit_type_int64(Visitor *v, int64_t *obj, const char
*name, Error **errp)
void visit_type_size(Visitor *v, uint64_t *obj, const char *name, Error **errp)
{
if (!error_is_set(errp)) {
- (v->type_size ? v->type_size : v->type_uint64)(v, obj, name, errp);
+ if (v->type_size) {
+ v->type_size(v, obj, name, errp);
+ } else {
+ visit_type_uint64(v, obj, name, errp);
+ }
}
}
--
1.8.3.1
- [Qemu-devel] [PATCH v5 00/14] ACPI memory hotplug, Hu Tao, 2013/06/26
- [Qemu-devel] [PATCH v5 03/14] qemu-option: export parse_option_number, Hu Tao, 2013/06/26
- [Qemu-devel] [PATCH v5 02/14] Add SIZE type to qdev properties, Hu Tao, 2013/06/26
- [Qemu-devel] [PATCH v5 06/14] acpi_piix4 : Implement memory device hotplug registers, Hu Tao, 2013/06/26
- [Qemu-devel] [PATCH v5 11/14] Introduce paravirt interface QEMU_CFG_PCI_WINDOW, Hu Tao, 2013/06/26
- [Qemu-devel] [PATCH v5 09/14] memory controller: initialize dram controller., Hu Tao, 2013/06/26
- [Qemu-devel] [PATCH v5 04/14] Implement dimm device abstraction, Hu Tao, 2013/06/26