X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=plug%2Fhotplug.c;h=061833a887449f4b541219b97cc8a7afc4b26570;hb=9851e517f1c3e55228e2fdde913c9cf0b87a4bc7;hp=ef98f3885b771f9b540234718427886f6a85fff2;hpb=7a460b86fb6515ea84a53fe8ba091f20cbe07d02;p=project%2Fprocd.git diff --git a/plug/hotplug.c b/plug/hotplug.c index ef98f38..061833a 100644 --- a/plug/hotplug.c +++ b/plug/hotplug.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -335,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);