summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-08-29 13:25:17 +0200
committerFelix Fietkau <nbd@openwrt.org>2014-08-29 13:25:17 +0200
commit0fc1e953351f89a52a6eaaab140729d34ca07809 (patch)
tree76f91223543c50e541bcf6d878888ce5ff7eb540
parentac51761d6b2262a1640e576ddff5a8ea4c7999d0 (diff)
downloadunitd-0fc1e953351f89a52a6eaaab140729d34ca07809.tar
unitd-0fc1e953351f89a52a6eaaab140729d34ca07809.zip
hotplug: avoid using the deprecated is_error() call, check for NULL pointer instead
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r--plug/hotplug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plug/hotplug.c b/plug/hotplug.c
index 6f65c17..061833a 100644
--- a/plug/hotplug.c
+++ b/plug/hotplug.c
@@ -336,7 +336,7 @@ rule_handle_file(struct json_script_ctx *ctx, const char *name)
json_object *obj;
obj = json_object_from_file((char*)name);
- if (is_error(obj))
+ if (!obj)
return NULL;
blob_buf_init(&script, 0);