summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorbket <bket@cvs.openbsd.org>2020-06-26 19:04:39 +0000
committerbket <bket@cvs.openbsd.org>2020-06-26 19:04:39 +0000
commit9016577cb08f7e227391be4cdfa9888f2202e9b7 (patch)
tree957047032e151393f79fa62256fa6f07860780f3 /usr.sbin
parentad6301efab7482ca0ebb79e7af13194107801e3c (diff)
Replace SIMPLEQ concatenation loop with SIMPLEQ_CONCAT
OK florian@, millert@, kn@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ospfd/ospfd.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/usr.sbin/ospfd/ospfd.c b/usr.sbin/ospfd/ospfd.c
index f9a902c21d8..5d00cc81912 100644
--- a/usr.sbin/ospfd/ospfd.c
+++ b/usr.sbin/ospfd/ospfd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfd.c,v 1.112 2020/03/29 12:36:01 denis Exp $ */
+/* $OpenBSD: ospfd.c,v 1.113 2020/06/26 19:04:38 bket Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -720,10 +720,7 @@ merge_config(struct ospfd_conf *conf, struct ospfd_conf *xconf)
SIMPLEQ_REMOVE_HEAD(&conf->redist_list, entry);
free(r);
}
- while ((r = SIMPLEQ_FIRST(&xconf->redist_list)) != NULL) {
- SIMPLEQ_REMOVE_HEAD(&xconf->redist_list, entry);
- SIMPLEQ_INSERT_TAIL(&conf->redist_list, r, entry);
- }
+ SIMPLEQ_CONCAT(&conf->redist_list, &xconf->redist_list);
/* adjust FIB priority if changed */
if (conf->fib_priority != xconf->fib_priority) {
@@ -782,10 +779,7 @@ merge_config(struct ospfd_conf *conf, struct ospfd_conf *xconf)
free(r);
}
- while ((r = SIMPLEQ_FIRST(&xa->redist_list)) != NULL) {
- SIMPLEQ_REMOVE_HEAD(&xa->redist_list, entry);
- SIMPLEQ_INSERT_TAIL(&a->redist_list, r, entry);
- }
+ SIMPLEQ_CONCAT(&a->redist_list, &xa->redist_list);
}
a->stub = xa->stub;