summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2011-05-03 17:08:52 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2011-05-03 17:08:52 +0000
commit1fd36aa434291906479f1bf6bed09f4f5dfe0b77 (patch)
treefd44cde574a8f65774c2cc34f0178dbe834f590e
parent7fba08f1eed5fcbf5857bd333e09bc0ae13e1aba (diff)
Move SLIST initializations earlier so that failure handling paths can
safely use them. Found by Clang. "go for it" marco@
-rw-r--r--sys/dev/softraid.c7
1 files 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 <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -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);