From 0cf8b0576a66ca28aeec98e19dc9c1cbf4324894 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 29 Jul 2016 11:04:30 +0200 Subject: [PATCH] trigger: reduce indentation level in trigger_event() Signed-off-by: Felix Fietkau --- service/trigger.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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); } } } -- 2.25.1