diff options
author | bket <bket@cvs.openbsd.org> | 2020-09-04 13:09:15 +0000 |
---|---|---|
committer | bket <bket@cvs.openbsd.org> | 2020-09-04 13:09:15 +0000 |
commit | 8a41193903e1eb9945a10faf137976114357490e (patch) | |
tree | caf79ca7a66fa93897c822aeca5886932c81d927 /usr.sbin | |
parent | 5e604eea359714d5a2cae6449343bddcce8648bb (diff) |
Replace TAILQ concatenation loop with TAILQ_CONCAT
OK millert@, florian@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/relayd/relay_http.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.sbin/relayd/relay_http.c b/usr.sbin/relayd/relay_http.c index 960d4c54a08..ec10f2446b1 100644 --- a/usr.sbin/relayd/relay_http.c +++ b/usr.sbin/relayd/relay_http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay_http.c,v 1.78 2019/07/13 06:53:00 chrisz Exp $ */ +/* $OpenBSD: relay_http.c,v 1.79 2020/09/04 13:09:14 bket Exp $ */ /* * Copyright (c) 2006 - 2016 Reyk Floeter <reyk@openbsd.org> @@ -1515,7 +1515,7 @@ relay_match_actions(struct ctl_relay_event *cre, struct relay_rule *rule, struct kvlist *matches, struct kvlist *actions, struct relay_table **tbl) { struct rsession *con = cre->con; - struct kv *kv, *tmp; + struct kv *kv; /* * Apply the following options instantly (action per match). @@ -1534,10 +1534,7 @@ relay_match_actions(struct ctl_relay_event *cre, struct relay_rule *rule, */ if (matches == NULL) { /* 'pass' or 'block' rule */ - TAILQ_FOREACH_SAFE(kv, &rule->rule_kvlist, kv_rule_entry, tmp) { - TAILQ_INSERT_TAIL(actions, kv, kv_action_entry); - TAILQ_REMOVE(&rule->rule_kvlist, kv, kv_rule_entry); - } + TAILQ_CONCAT(actions, &rule->rule_kvlist, kv_rule_entry); } else { /* 'match' rule */ TAILQ_FOREACH(kv, matches, kv_match_entry) { |