From: benno Date: Sun, 9 Sep 2018 14:08:11 +0000 (+0000) Subject: use TAILQ_CONCAT in filterset_move(). ok claudio@ X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a42490911b2f4af2f9da970a0b056933e460c414;p=openbsd use TAILQ_CONCAT in filterset_move(). ok claudio@ --- 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 @@ -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