Module Name:    src
Committed By:   martin
Date:           Sun Apr 21 07:50:59 UTC 2019

Modified Files:
        src/usr.sbin/sysinst: partman.c

Log Message:
Use FOREACH_SAFE when removing devices from our internal list.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/sysinst/partman.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/partman.c
diff -u src/usr.sbin/sysinst/partman.c:1.30 src/usr.sbin/sysinst/partman.c:1.31
--- src/usr.sbin/sysinst/partman.c:1.30	Tue Feb 12 18:32:15 2019
+++ src/usr.sbin/sysinst/partman.c	Sun Apr 21 07:50:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: partman.c,v 1.30 2019/02/12 18:32:15 martin Exp $ */
+/*	$NetBSD: partman.c,v 1.31 2019/04/21 07:50:59 martin Exp $ */
 
 /*
  * Copyright 2012 Eugene Lozovoy
@@ -1998,9 +1998,9 @@ static int
 pm_clean(void)
 {
 	int count = 0;
-	pm_devs_t *pm_i;
+	pm_devs_t *pm_i, *tmp;
 
-	SLIST_FOREACH(pm_i, &pm_head, l)
+	SLIST_FOREACH_SAFE(pm_i, &pm_head, l, tmp)
 		if (! pm_i->found) {
 			count++;
 			SLIST_REMOVE(&pm_head, pm_i, pm_devs_t, l);

Reply via email to