diff options
author | 2021-11-10 15:28:22 -0800 | |
---|---|---|
committer | 2022-06-10 18:57:08 +0200 | |
commit | 1d5dd08074f9530196cc9700161c61a667f8e58a (patch) | |
tree | ec3fb32a0be907450805541d2a3e0f0ec19d9718 | |
parent | if_wg: wg_queue_len: remove locking (diff) | |
download | wireguard-freebsd-1d5dd08074f9530196cc9700161c61a667f8e58a.tar.xz wireguard-freebsd-1d5dd08074f9530196cc9700161c61a667f8e58a.zip |
if_wg: wg_queue_delist_staged: use more standard STAILQ_CONCAT
No functional change.
Signed-off-by: John Baldwin <jhb@FreeBSD.org>
-rw-r--r-- | src/if_wg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/if_wg.c b/src/if_wg.c index 262024b..6f53a38 100644 --- a/src/if_wg.c +++ b/src/if_wg.c @@ -1867,9 +1867,9 @@ wg_queue_enlist_staged(struct wg_queue *staged, struct wg_packet_list *list) static void wg_queue_delist_staged(struct wg_queue *staged, struct wg_packet_list *list) { + STAILQ_INIT(list); mtx_lock(&staged->q_mtx); - *list = staged->q_queue; - STAILQ_INIT(&staged->q_queue); + STAILQ_CONCAT(list, &staged->q_queue); staged->q_len = 0; mtx_unlock(&staged->q_mtx); } |