summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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))