if_wg: wg_queue_delist_staged: use more standard STAILQ_CONCAT

No functional change.

Signed-off-by: John Baldwin <jhb@FreeBSD.org>
This commit is contained in:
John Baldwin 2021-11-10 15:28:22 -08:00 committed by Jason A. Donenfeld
parent a31339b25e
commit 1d5dd08074
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}