summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew <matthew@openbsd.org>2011-05-03 17:08:51 +0000
committermatthew <matthew@openbsd.org>2011-05-03 17:08:51 +0000
commit768358b47c7a02e37d1ac2b8cefa2ee72d08bd5c (patch)
tree561381e6e13f97e0f99bbc20cb3b44359ee25e56
parentspaces (diff)
downloadwireguard-openbsd-768358b47c7a02e37d1ac2b8cefa2ee72d08bd5c.tar.xz
wireguard-openbsd-768358b47c7a02e37d1ac2b8cefa2ee72d08bd5c.zip
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);