diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-04-06 04:16:36 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-04-06 04:16:36 +0000 |
commit | 3338c9e2e785ecbbbb4c24aaf79ebdf77f0d26ec (patch) | |
tree | fcf46901d25cde6c38c350d31aab13ff5f77c596 /sys/dev/ic/ami.c | |
parent | 0505bad000912a66c4f92c91a72202b9250e4bd5 (diff) |
kudos to djm for finding an embarrassing bug. using the same variable
as a counter for both an inner and outer loop is not good(tm).
ok marco@
Diffstat (limited to 'sys/dev/ic/ami.c')
-rw-r--r-- | sys/dev/ic/ami.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index 1abbfb13cad..d008c5e799e 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.141 2006/04/05 14:07:24 dlg Exp $ */ +/* $OpenBSD: ami.c,v 1.142 2006/04/06 04:16:35 dlg Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -1040,7 +1040,7 @@ void ami_complete(struct ami_softc *sc, struct ami_ccb *ccb, int timeout) { struct ami_iocmd mbox; - int i = 0, done = 0; + int i = 0, j, done = 0; int s; s = splbio(); @@ -1065,8 +1065,8 @@ ami_complete(struct ami_softc *sc, struct ami_ccb *ccb, int timeout) i = 0; while (i < timeout) { if (sc->sc_done(sc, &mbox) != 0) { - for (i = 0; i < mbox.acc_nstat; i++) { - int ready = mbox.acc_cmplidl[i]; + for (j = 0; j < mbox.acc_nstat; j++) { + int ready = mbox.acc_cmplidl[j]; ami_done(sc, ready); if (ready == ccb->ccb_cmd.acc_id) done = 1; |