diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-08-29 13:25:17 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-08-29 13:25:17 +0200 |
commit | 0fc1e953351f89a52a6eaaab140729d34ca07809 (patch) | |
tree | 76f91223543c50e541bcf6d878888ce5ff7eb540 | |
parent | ac51761d6b2262a1640e576ddff5a8ea4c7999d0 (diff) | |
download | unitd-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.c | 2 |
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); |