projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c92106e
)
handler: replace is_error() helper with NULL check
author
Alexandru Ardelean
<ardeleanalex@gmail.com>
Fri, 8 Dec 2017 14:22:13 +0000
(16:22 +0200)
committer
Hans Dedecker
<dedeckeh@gmail.com>
Sun, 10 Dec 2017 16:36:54 +0000
(17:36 +0100)
The `is_error()` is just a macro that checks
that object is NULL (which is considered an error
in libjson-c terminology).
Newer libjson-c versions have deprecated this.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
handler.c
patch
|
blob
|
history
diff --git
a/handler.c
b/handler.c
index 0c4627f1ca549429c63a3e3809a47d5bf4429b7e..a0b2a57b146ca030c91edb4d60cc1bc1c4211d4a 100644
(file)
--- a/
handler.c
+++ b/
handler.c
@@
-105,7
+105,7
@@
netifd_parse_script_handler(const char *name, script_dump_cb cb)
tok = json_tokener_new();
obj = json_tokener_parse_ex(tok, start, len);
- if (
!is_error(obj)
) {
+ if (
obj
) {
netifd_init_script_handler(name, obj, cb);
json_object_put(obj);
json_tokener_free(tok);