summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-05-23 16:42:20 +0200
committerFelix Fietkau <nbd@openwrt.org>2015-05-23 16:44:46 +0200
commitedb414294c06fb9d275c9f3be2282283453a46d0 (patch)
treed5cca5dbd0dea51bbe85dd063ccfe5efdf62542d
parenta7e508b71c1cf3ee9d401510d298195067fba8e5 (diff)
proto-shell: simplify no_proto_task assignment
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r--proto-shell.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/proto-shell.c b/proto-shell.c
index 50f1b5b..bac57e0 100644
--- a/proto-shell.c
+++ b/proto-shell.c
@@ -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);
- 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))