Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix issue when JSON value is NULL in xreq
[src/app-framework-binder.git]
/
src
/
afb-xreq.c
diff --git
a/src/afb-xreq.c
b/src/afb-xreq.c
index
e8a4222
..
fbed6ed
100644
(file)
--- a/
src/afb-xreq.c
+++ b/
src/afb-xreq.c
@@
-55,7
+55,9
@@
static void vinfo(void *first, void *second, const char *fmt, va_list args, void
static struct json_object *xreq_json_cb(void *closure)
{
struct afb_xreq *xreq = closure;
static struct json_object *xreq_json_cb(void *closure)
{
struct afb_xreq *xreq = closure;
- return xreq->json ? : (xreq->json = xreq->queryitf->json(xreq));
+ if (!xreq->json && xreq->queryitf->json)
+ xreq->json = xreq->queryitf->json(xreq);
+ return xreq->json;
}
static struct afb_arg xreq_get_cb(void *closure, const char *name)
}
static struct afb_arg xreq_get_cb(void *closure, const char *name)