summaryrefslogtreecommitdiff
path: root/qobject
diff options
context:
space:
mode:
Diffstat (limited to 'qobject')
-rw-r--r--qobject/json-parser.c2
-rw-r--r--qobject/qnull.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/qobject/json-parser.c b/qobject/json-parser.c
index 7a417f20cd..724ca240e4 100644
--- a/qobject/json-parser.c
+++ b/qobject/json-parser.c
@@ -445,7 +445,7 @@ static QObject *parse_keyword(JSONParserContext *ctxt)
} else if (!strcmp(token->str, "false")) {
return QOBJECT(qbool_from_bool(false));
} else if (!strcmp(token->str, "null")) {
- return qnull();
+ return QOBJECT(qnull());
}
parse_error(ctxt, token, "invalid keyword '%s'", token->str);
return NULL;
diff --git a/qobject/qnull.c b/qobject/qnull.c
index c124d0585e..69a21d1059 100644
--- a/qobject/qnull.c
+++ b/qobject/qnull.c
@@ -14,7 +14,9 @@
#include "qemu-common.h"
#include "qapi/qmp/qobject.h"
-QObject qnull_ = {
- .type = QTYPE_QNULL,
- .refcnt = 1,
+QNull qnull_ = {
+ .base = {
+ .type = QTYPE_QNULL,
+ .refcnt = 1,
+ },
};