diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-09-25 11:07:13 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-09-25 11:07:13 +0000 |
commit | cc5862a7685fa8eb59fabddbdb1054db8eb5d662 (patch) | |
tree | 80b246269a077248b3f39694eb98601135cdf4c4 /sys/dev | |
parent | cb3c42bb896a1e1e2969293080f52e46112cce07 (diff) |
Add 'default:' stanza to switch() to make clear that 'status' is always
initialized. From NetBSD. "won't hurt" miod@.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/umass.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index 764b09633ac..139648f6d39 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass.c,v 1.57 2008/06/26 05:42:18 ray Exp $ */ +/* $OpenBSD: umass.c,v 1.58 2008/09/25 11:07:12 krw Exp $ */ /* $NetBSD: umass.c,v 1.116 2004/06/30 05:53:46 mycroft Exp $ */ /* @@ -1740,8 +1740,6 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv, sc->transfer_cb(sc, sc->transfer_priv, sc->transfer_datalen - sc->transfer_actlen, status); } else { - int status; - /* Command Interrupt Data Block */ DPRINTF(UDMASS_CBI, ("%s: type=0x%02x, value=0x%02x\n", @@ -1749,6 +1747,7 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv, sc->sbl.common.type, sc->sbl.common.value)); if (sc->sbl.common.type == IDB_TYPE_CCI) { + int status; switch (sc->sbl.common.value & IDB_VALUE_STATUS_MASK) { case IDB_VALUE_PASS: @@ -1759,6 +1758,7 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv, status = STATUS_CMD_FAILED; break; case IDB_VALUE_PHASE: + default: status = STATUS_WIRE_FAILED; break; } |