diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2021-11-11 09:34:28 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2021-11-11 09:34:28 +0000 |
commit | 89280b45d7b17290068f59dfd995e0aecc0dfb0b (patch) | |
tree | a3740d3f77f4692f0fe5fa21020c24386c60c671 | |
parent | ed3d5d8e1110dfcba96c5699cb7cb36064217819 (diff) |
Convert a for loop into LIST_FOREACH to reduce the diff to NetBSD.
ok millert mpi
-rw-r--r-- | sys/uvm/uvm_swap.c | 6 |
1 files 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; |