diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-02-18 20:49:28 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-02-18 20:49:28 +0000 |
commit | 813087a07a610752b4c49a07df8d42665bad1cd1 (patch) | |
tree | 6e93b94d15644c3aa5e659956bb5636962cc7727 /sys | |
parent | a21e48ecc1227742fb0e02b4d8ee2342fb72b97c (diff) |
Fix thinko in list traversal in vsbic_cmd_ccb().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mvme68k/dev/vsbic.c | 5 | ||||
-rw-r--r-- | sys/arch/mvme88k/dev/vsbic.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/mvme68k/dev/vsbic.c b/sys/arch/mvme68k/dev/vsbic.c index ba1c32c2147..89215fab0c4 100644 --- a/sys/arch/mvme68k/dev/vsbic.c +++ b/sys/arch/mvme68k/dev/vsbic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vsbic.c,v 1.2 2009/02/18 20:48:53 miod Exp $ */ +/* $OpenBSD: vsbic.c,v 1.3 2009/02/18 20:49:25 miod Exp $ */ /* * Copyright (c) 2008, 2009 Miodrag Vallat. @@ -922,7 +922,8 @@ vsbic_cmd_ccb(struct vsbic_softc *sc, struct vsbic_cmd *cmd) { struct vsbic_ccb *ccb, *prev; - for (prev = NULL, ccb = sc->sc_ccb_active; ccb != NULL; prev = ccb++) { + for (prev = NULL, ccb = sc->sc_ccb_active; ccb != NULL; + prev = ccb, ccb = ccb->ccb_next) { if (ccb->ccb_cmd == cmd) { if (prev == NULL) sc->sc_ccb_active = ccb->ccb_next; diff --git a/sys/arch/mvme88k/dev/vsbic.c b/sys/arch/mvme88k/dev/vsbic.c index afd2447275d..3add3ad1641 100644 --- a/sys/arch/mvme88k/dev/vsbic.c +++ b/sys/arch/mvme88k/dev/vsbic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vsbic.c,v 1.3 2009/02/16 21:19:06 miod Exp $ */ +/* $OpenBSD: vsbic.c,v 1.4 2009/02/18 20:49:27 miod Exp $ */ /* * Copyright (c) 2008, 2009 Miodrag Vallat. @@ -922,7 +922,8 @@ vsbic_cmd_ccb(struct vsbic_softc *sc, struct vsbic_cmd *cmd) { struct vsbic_ccb *ccb, *prev; - for (prev = NULL, ccb = sc->sc_ccb_active; ccb != NULL; prev = ccb++) { + for (prev = NULL, ccb = sc->sc_ccb_active; ccb != NULL; + prev = ccb, ccb = ccb->ccb_next) { if (ccb->ccb_cmd == cmd) { if (prev == NULL) sc->sc_ccb_active = ccb->ccb_next; |