diff options
author | bket <bket@cvs.openbsd.org> | 2020-06-27 07:24:43 +0000 |
---|---|---|
committer | bket <bket@cvs.openbsd.org> | 2020-06-27 07:24:43 +0000 |
commit | 528ac0f9c7ab06aab4efd9e38b0fb2eec3822cbf (patch) | |
tree | 30c2aa29147e37c7ffc1097e5924da834c98c518 /usr.sbin | |
parent | fcead842cee44cc574fdfd90bdcd7b3ab47d3470 (diff) |
Replace TAILQ concatenation loop with TAILQ_CONCAT
OK claudio@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/session.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 4930c38e999..e02f25fd9ff 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.401 2020/05/10 13:38:46 deraadt Exp $ */ +/* $OpenBSD: session.c,v 1.402 2020/06/27 07:24:42 bket Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org> @@ -2732,12 +2732,8 @@ session_dispatch_imsg(struct imsgbuf *ibuf, int idx, u_int *listener_cnt) } /* add new listeners */ - while ((la = TAILQ_FIRST(nconf->listen_addrs)) != - NULL) { - TAILQ_REMOVE(nconf->listen_addrs, la, entry); - TAILQ_INSERT_TAIL(conf->listen_addrs, la, - entry); - } + TAILQ_CONCAT(conf->listen_addrs, nconf->listen_addrs, + entry); setup_listeners(listener_cnt); free_config(nconf); |