aboutsummaryrefslogtreecommitdiff
path: root/qobject
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-02-28 22:26:56 +0100
committerMarkus Armbruster <armbru@redhat.com>2017-03-07 16:07:47 +0100
commitea5ef5c80b655456971b00f7ffaad5e26d4c5978 (patch)
tree248bd293291434de5e3f2a33a49a8b6de1d31068 /qobject
parent53f991520ea866a315ef946deb79e4c92b71fe3d (diff)
qjson: Abort earlier on qobject_from_jsonf() misuse
Ignoring errors first, then asserting success is suboptimal. Pass &error_abort instead, so we abort earlier, and hopefully get more useful clues on what's wrong. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <1488317230-26248-11-git-send-email-armbru@redhat.com>
Diffstat (limited to 'qobject')
-rw-r--r--qobject/qjson.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qobject/qjson.c b/qobject/qjson.c
index 339c9f7de2..c98d6a71cc 100644
--- a/qobject/qjson.c
+++ b/qobject/qjson.c
@@ -65,7 +65,7 @@ QObject *qobject_from_jsonf(const char *string, ...)
va_list ap;
va_start(ap, string);
- obj = qobject_from_jsonv(string, &ap, NULL);
+ obj = qobject_from_jsonv(string, &ap, &error_abort);
va_end(ap);
assert(obj != NULL);