summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2018-09-09 14:08:12 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2018-09-09 14:08:12 +0000
commit0061f0d4b5a3fcdbd09c585acbf5ee6b2fa86ca9 (patch)
tree0882dc39876a3fbd2c914819701f8c3424de71ad /usr.sbin/bgpd
parent11fb250ce7e304ccfc265ae5b7852f90e875c491 (diff)
use TAILQ_CONCAT in filterset_move(). ok claudio@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/rde_filter.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/usr.sbin/bgpd/rde_filter.c b/usr.sbin/bgpd/rde_filter.c
index 04d7f13ab94..39db8a9cbf0 100644
--- a/usr.sbin/bgpd/rde_filter.c
+++ b/usr.sbin/bgpd/rde_filter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_filter.c,v 1.105 2018/09/08 15:25:27 benno Exp $ */
+/* $OpenBSD: rde_filter.c,v 1.106 2018/09/09 14:08:11 benno Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -756,17 +756,10 @@ filterset_cmp(struct filter_set *a, struct filter_set *b)
void
filterset_move(struct filter_set_head *source, struct filter_set_head *dest)
{
- struct filter_set *s;
-
TAILQ_INIT(dest);
-
if (source == NULL)
return;
-
- while ((s = TAILQ_FIRST(source)) != NULL) {
- TAILQ_REMOVE(source, s, entry);
- TAILQ_INSERT_TAIL(dest, s, entry);
- }
+ TAILQ_CONCAT(dest, source, entry);
}
int