Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Uninitialised variables, from Krister Walfridsso...
details: https://anonhg.NetBSD.org/src/rev/8f3a9f61e22d
branches: trunk
changeset: 510500:8f3a9f61e22d
user: bouyer <bouyer%NetBSD.org@localhost>
date: Wed May 30 20:31:39 2001 +0000
description:
Uninitialised variables, from Krister Walfridsson: in umass_scsipi_request()
initialize cmd before using it. Now that it's initialised earlier, use it
instead of xs->cmd
diffstat:
sys/dev/usb/umassbus.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (41 lines):
diff -r 6caa3536a346 -r 8f3a9f61e22d sys/dev/usb/umassbus.c
--- a/sys/dev/usb/umassbus.c Wed May 30 20:30:02 2001 +0000
+++ b/sys/dev/usb/umassbus.c Wed May 30 20:31:39 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: umassbus.c,v 1.7 2001/05/15 15:25:04 lukem Exp $ */
+/* $NetBSD: umassbus.c,v 1.8 2001/05/30 20:31:39 bouyer Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -269,16 +269,19 @@
}
#endif
+ cmd = xs->cmd;
+ cmdlen = xs->cmdlen;
+
/* XXX should use transform */
- if (xs->cmd->opcode == START_STOP &&
+ if (cmd->opcode == START_STOP &&
(sc->quirks & NO_START_STOP)) {
/*printf("%s: START_STOP\n", USBDEVNAME(sc->sc_dev));*/
xs->error = XS_NOERROR;
goto done;
}
- if (xs->cmd->opcode == INQUIRY &&
+ if (cmd->opcode == INQUIRY &&
(sc->quirks & FORCE_SHORT_INQUIRY)) {
/*
* some drives wedge when asked for full inquiry
@@ -308,9 +311,6 @@
goto done;
}
- cmd = xs->cmd;
- cmdlen = xs->cmdlen;
-
if (xs->xs_control & XS_CTL_POLL) {
/* Use sync transfer. XXX Broken! */
DPRINTF(UDMASS_SCSI,
Home |
Main Index |
Thread Index |
Old Index