Signed-off-by: Markus Armbruster <arm...@redhat.com> --- include/qom/object.h | 4 ++-- hw/core/machine-qmp-cmds.c | 6 +++--- qom/object.c | 9 +++++---- 3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/include/qom/object.h b/include/qom/object.h index ccfa82e33d..5d1ed672c3 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -1331,8 +1331,8 @@ int object_property_get_enum(Object *obj, const char *name, * undefined if an error occurs (including when the property value is not * an list of integers). */ -void object_property_get_uint16List(Object *obj, const char *name, - uint16List **list, Error **errp); +uint16List *object_property_get_uint16List(Object *obj, const char *name, + Error **errp); /** * object_property_set: diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index eed5aeb2f7..f3a28035fc 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -325,9 +325,9 @@ static int query_memdev(Object *obj, void *opaque) "policy", "HostMemPolicy", &error_abort); - object_property_get_uint16List(obj, "host-nodes", - &m->value->host_nodes, - &error_abort); + m->value->host_nodes = object_property_get_uint16List(obj, + "host-nodes", + &error_abort); m->next = *list; *list = m; diff --git a/qom/object.c b/qom/object.c index 9c74749193..ddb021db21 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1559,10 +1559,11 @@ int object_property_get_enum(Object *obj, const char *name, return ret; } -void object_property_get_uint16List(Object *obj, const char *name, - uint16List **list, Error **errp) +uint16List *object_property_get_uint16List(Object *obj, const char *name, + Error **errp) { Error *err = NULL; + uint16List *list = NULL; Visitor *v; char *str; @@ -1575,11 +1576,11 @@ void object_property_get_uint16List(Object *obj, const char *name, visit_complete(v, &str); visit_free(v); v = string_input_visitor_new(str); - visit_type_uint16List(v, NULL, list, errp); - + visit_type_uint16List(v, NULL, &list, errp); g_free(str); out: visit_free(v); + return list; } void object_property_parse(Object *obj, const char *string, -- 2.21.1