From 1fd36aa434291906479f1bf6bed09f4f5dfe0b77 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Tue, 3 May 2011 17:08:52 +0000 Subject: Move SLIST initializations earlier so that failure handling paths can safely use them. Found by Clang. "go for it" marco@ --- sys/dev/softraid.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index bd2f44a7eef..e3ffeae7994 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.229 2011/04/29 13:04:38 dlg Exp $ */ +/* $OpenBSD: softraid.c,v 1.230 2011/05/03 17:08:51 matthew Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom * Copyright (c) 2008 Chris Kuethe @@ -1085,6 +1085,8 @@ sr_boot_assembly(struct sr_softc *sc) SLIST_INIT(&sdklist); SLIST_INIT(&mlh); + SLIST_INIT(&bvh); + SLIST_INIT(&kdh); dk = TAILQ_FIRST(&disklist); while (dk != TAILQ_END(&disklist)) { @@ -1127,9 +1129,6 @@ sr_boot_assembly(struct sr_softc *sc) * Create a list of volumes and associate chunks with each volume. */ - SLIST_INIT(&bvh); - SLIST_INIT(&kdh); - for (mle = SLIST_FIRST(&mlh); mle != SLIST_END(&mlh); mle = mlenext) { mlenext = SLIST_NEXT(mle, sml_link); -- cgit v1.2.3