From: Felix Fietkau Date: Fri, 29 Jul 2016 09:04:30 +0000 (+0200) Subject: trigger: reduce indentation level in trigger_event() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0cf8b0576a66ca28aeec98e19dc9c1cbf4324894;p=project%2Fprocd.git trigger: reduce indentation level in trigger_event() Signed-off-by: Felix Fietkau --- diff --git a/service/trigger.c b/service/trigger.c index 216e1f2..4cfea31 100644 --- a/service/trigger.c +++ b/service/trigger.c @@ -338,14 +338,14 @@ void trigger_event(const char *type, struct blob_attr *data) list_for_each_entry(t, &triggers, list) { if (t->remove) continue; - if (trigger_match(type, t->type)) { - if (t->timeout) { - free(t->data); - t->data = blob_memdup(data); - uloop_timeout_set(&t->delay, t->timeout); - } else { - json_script_run(&t->jctx, t->type, data); - } + if (!trigger_match(type, t->type)) + continue; + if (t->timeout) { + free(t->data); + t->data = blob_memdup(data); + uloop_timeout_set(&t->delay, t->timeout); + } else { + json_script_run(&t->jctx, t->type, data); } } }