diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-09-22 19:44:01 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-09-22 19:44:01 +0000 |
commit | 104ab0a9dc1ab33da8fd41da7af70486a96d069c (patch) | |
tree | 932f92518f332e791944f16503f438b46c9f3540 | |
parent | b1b186fddfce4bd3c898b4a5d83e68688daf693c (diff) |
Make sure some possibly uninitialized local variables are assigned correct
values in all cases.
ok marco@
-rw-r--r-- | sys/dev/softraid.c | 4 | ||||
-rw-r--r-- | sys/dev/softraid_crypto.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index d7bdbf2c650..eb4b42c3a20 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.119 2008/07/21 14:49:40 marco Exp $ */ +/* $OpenBSD: softraid.c,v 1.120 2008/09/22 19:44:00 miod Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -923,13 +923,13 @@ sr_boot_assembly(struct sr_softc *sc) continue; no_dev = 0; + m1 = (struct sr_metadata *)&mle->sml_metadata; bzero(dt, BIOC_CRMAXLEN); SLIST_FOREACH(mle2, &mlh, sml_link) { /* chunk used already? */ if (mle2->sml_used) continue; - m1 = (struct sr_metadata *)&mle->sml_metadata; m2 = (struct sr_metadata *)&mle2->sml_metadata; /* are we the same volume? */ diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c index 881ee1be7a4..37ea6712b6c 100644 --- a/sys/dev/softraid_crypto.c +++ b/sys/dev/softraid_crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_crypto.c,v 1.30 2008/08/15 11:18:10 djm Exp $ */ +/* $OpenBSD: softraid_crypto.c,v 1.31 2008/09/22 19:44:00 miod Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org> @@ -80,7 +80,7 @@ sr_crypto_getcryptop(struct sr_workunit *wu, int encrypt) { struct scsi_xfer *xs = wu->swu_xs; struct sr_discipline *sd = wu->swu_dis; - struct cryptop *crp; + struct cryptop *crp = NULL; struct cryptodesc *crd; struct uio *uio = NULL; int flags, i, n, s; |