diff options
author | Alexandru Ardelean <ardeleanalex@gmail.com> | 2017-12-08 16:22:13 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2017-12-10 17:36:54 +0100 |
commit | d3a5df04bdcc039d900df49c8c608c1a91a976c7 (patch) | |
tree | d629ebc5d650cec240a6d27845c915526bd07b42 /handler.c | |
parent | c92106e3048ae10cb04a7c7303ba5f53bc057953 (diff) |
handler: replace is_error() helper with NULL check
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>
Diffstat (limited to 'handler.c')
-rw-r--r-- | handler.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |