diff options
author | 2020-06-27 07:24:42 +0000 | |
---|---|---|
committer | 2020-06-27 07:24:42 +0000 | |
commit | dbf2cc62e98d234e2ad8957429b1cf16a22985bd (patch) | |
tree | 9703fa444d3b93878de6c20911bfaef291a8c79e | |
parent | Replace TAILQ concatenation loop with TAILQ_CONCAT (diff) | |
download | wireguard-openbsd-dbf2cc62e98d234e2ad8957429b1cf16a22985bd.tar.xz wireguard-openbsd-dbf2cc62e98d234e2ad8957429b1cf16a22985bd.zip |
Replace TAILQ concatenation loop with TAILQ_CONCAT
OK claudio@
-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); |