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 <arm...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Message-Id: <1488317230-26248-11-git-send-email-arm...@redhat.com> --- qobject/qjson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qobject/qjson.c b/qobject/qjson.c index 339c9f7..c98d6a7 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); -- 2.7.4