summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cc00aef)
raw | patch | inline | side by side (parent: cc00aef)
author | Florian Forster <octo@collectd.org> | |
Sat, 5 Dec 2015 21:49:05 +0000 (22:49 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 5 Dec 2015 21:49:05 +0000 (22:49 +0100) |
src/filter_chain.c | patch | blob | history |
diff --git a/src/filter_chain.c b/src/filter_chain.c
index e25e7a03316dfd07dfb282b3fcd06c205014bcef..903f66f912d60087dd56b35458bb3b7bc58c3114 100644 (file)
--- a/src/filter_chain.c
+++ b/src/filter_chain.c
{
fc_rule_t *rule;
fc_target_t *target;
- int status;
+ int status = FC_TARGET_CONTINUE;
if (chain == NULL)
return (-1);
DEBUG ("fc_process_chain (chain = %s);", chain->name);
- status = FC_TARGET_CONTINUE;
for (rule = chain->rules; rule != NULL; rule = rule->next)
{
fc_match_t *match;
+ status = FC_TARGET_CONTINUE;
if (rule->name[0] != 0)
{
}
}
- if ((status == FC_TARGET_STOP)
- || (status == FC_TARGET_RETURN))
+ if ((status == FC_TARGET_STOP) || (status == FC_TARGET_RETURN))
{
if (rule->name[0] != 0)
{
}
break;
}
- else
- {
- status = FC_TARGET_CONTINUE;
- }
} /* for (rule) */
- if (status == FC_TARGET_STOP)
- return (FC_TARGET_STOP);
- else if (status == FC_TARGET_RETURN)
- return (FC_TARGET_CONTINUE);
+ if ((status == FC_TARGET_STOP) || (status == FC_TARGET_RETURN))
+ return (status);
DEBUG ("fc_process_chain (%s): Executing the default targets.",
chain->name);