Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic fix bogus GCC uninitialized variable warning. Us...
details: https://anonhg.NetBSD.org/src/rev/b46c75860cf1
branches: trunk
changeset: 554472:b46c75860cf1
user: matt <matt%NetBSD.org@localhost>
date: Tue Oct 28 18:35:06 2003 +0000
description:
fix bogus GCC uninitialized variable warning. Use TAILQ_FOREACH.
diffstat:
sys/dev/ic/siop.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diffs (40 lines):
diff -r 9daa82d0d2ff -r b46c75860cf1 sys/dev/ic/siop.c
--- a/sys/dev/ic/siop.c Tue Oct 28 18:21:49 2003 +0000
+++ b/sys/dev/ic/siop.c Tue Oct 28 18:35:06 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siop.c,v 1.68 2003/10/25 18:35:43 christos Exp $ */
+/* $NetBSD: siop.c,v 1.69 2003/10/28 18:35:06 matt Exp $ */
/*
* Copyright (c) 2000 Manuel Bouyer.
@@ -33,7 +33,7 @@
/* SYM53c7/8xx PCI-SCSI I/O Processors driver */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.68 2003/10/25 18:35:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.69 2003/10/28 18:35:06 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -340,9 +340,9 @@
SIOP_ISTAT, 0);
}
/* use DSA to find the current siop_cmd */
+ siop_cmd = NULL;
dsa = bus_space_read_4(sc->sc_c.sc_rt, sc->sc_c.sc_rh, SIOP_DSA);
- for (cbdp = TAILQ_FIRST(&sc->cmds); cbdp != NULL;
- cbdp = TAILQ_NEXT(cbdp, next)) {
+ TAILQ_FOREACH(cbdp, &sc->cmds, next) {
if (dsa >= cbdp->xferdma->dm_segs[0].ds_addr &&
dsa < cbdp->xferdma->dm_segs[0].ds_addr + PAGE_SIZE) {
dsa -= cbdp->xferdma->dm_segs[0].ds_addr;
@@ -352,9 +352,6 @@
break;
}
}
- if (cbdp == NULL) {
- siop_cmd = NULL;
- }
if (siop_cmd) {
xs = siop_cmd->cmd_c.xs;
siop_target = (struct siop_target *)siop_cmd->cmd_c.siop_target;
Home |
Main Index |
Thread Index |
Old Index