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
diff options
context:
space:
mode:
-rw-r--r--blobmsg_json.c2
-rw-r--r--jshn.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/blobmsg_json.c b/blobmsg_json.c
index 8f208e0..5aa528b 100644
--- a/blobmsg_json.c
+++ b/blobmsg_json.c
@@ -76,7 +76,7 @@ static bool __blobmsg_add_json(struct blob_buf *b, json_object *obj)
{
bool ret = false;
- if (is_error(obj))
+ if (!obj)
return false;
if (json_object_get_type(obj) != json_type_object)
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;
}