interface: teardown on l3_dev link lost.
[project/netifd.git] / proto-shell.c
index 50f1b5b..bac57e0 100644 (file)
@@ -821,10 +821,7 @@ proto_shell_add_handler(const char *script, const char *name, json_object *obj)
                handler->proto.flags |= PROTO_FLAG_NODEV;
 
        tmp = json_get_field(obj, "no-proto-task", json_type_boolean);
                handler->proto.flags |= PROTO_FLAG_NODEV;
 
        tmp = json_get_field(obj, "no-proto-task", json_type_boolean);
-       if (tmp && json_object_get_boolean(tmp))
-               handler->no_proto_task = true;
-       else
-               handler->no_proto_task = false;
+       handler->no_proto_task = tmp && json_object_get_boolean(tmp);
 
        tmp = json_get_field(obj, "available", json_type_boolean);
        if (tmp && json_object_get_boolean(tmp))
 
        tmp = json_get_field(obj, "available", json_type_boolean);
        if (tmp && json_object_get_boolean(tmp))