Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/jshn.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-09-23 14:02:31 +0400
committerFelix Fietkau <nbd@openwrt.org>2014-09-23 14:02:31 +0400
commitc8fc0897cdfff6393919030e24809e938ee5076f (patch)
treef461949b2ddeac3afc669de93add57a129b7402d /jshn.c
parentfa73496098893e90330040b8f43f2773b42eed12 (diff)
avoid using the deprecated is_error() function from json-c
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'jshn.c')
-rw-r--r--jshn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/jshn.c b/jshn.c
index cec48a0..e7e02d1 100644
--- a/jshn.c
+++ b/jshn.c
@@ -164,7 +164,7 @@ static int jshn_parse(const char *str)
json_object *obj;
obj = json_tokener_parse(str);
- if (is_error(obj) || json_object_get_type(obj) != json_type_object) {
+ if (!obj || json_object_get_type(obj) != json_type_object) {
fprintf(stderr, "Failed to parse message data\n");
return 1;
}