From c1d6b47aa2823259c2696c8c64d4b606f6f5e80c Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 11 Nov 2021 09:34:27 +0000 Subject: [PATCH] Convert a for loop into LIST_FOREACH to reduce the diff to NetBSD. ok millert mpi --- sys/uvm/uvm_swap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c index d333e547e06..661b10caa8e 100644 --- a/sys/uvm/uvm_swap.c +++ b/sys/uvm/uvm_swap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_swap.c,v 1.150 2021/03/26 13:40:05 mpi Exp $ */ +/* $OpenBSD: uvm_swap.c,v 1.151 2021/11/11 09:34:27 tb Exp $ */ /* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */ /* @@ -455,8 +455,8 @@ swaplist_insert(struct swapdev *sdp, struct swappri *newspp, int priority) /* * find entry at or after which to insert the new device. */ - for (pspp = NULL, spp = LIST_FIRST(&swap_priority); spp != NULL; - spp = LIST_NEXT(spp, spi_swappri)) { + pspp = NULL; + LIST_FOREACH(spp, &swap_priority, spi_swappri) { if (priority <= spp->spi_priority) break; pspp = spp; -- 2.20.1