提交 ea5ef5c8 编写于 作者: M Markus Armbruster

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: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NKevin Wolf <kwolf@redhat.com>
Message-Id: <1488317230-26248-11-git-send-email-armbru@redhat.com>
上级 53f99152
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册