Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ieee1394 Fix a bug.



details:   https://anonhg.NetBSD.org/src/rev/4f42394d02a4
branches:  trunk
changeset: 754077:4f42394d02a4
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Mon Apr 19 07:00:58 2010 +0000

description:
Fix a bug.
  STAILQ is not NULL termination.

diffstat:

 sys/dev/ieee1394/fwohci.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 303ff153e1c2 -r 4f42394d02a4 sys/dev/ieee1394/fwohci.c
--- a/sys/dev/ieee1394/fwohci.c Mon Apr 19 06:55:11 2010 +0000
+++ b/sys/dev/ieee1394/fwohci.c Mon Apr 19 07:00:58 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fwohci.c,v 1.123 2010/03/29 07:34:02 kiyohara Exp $    */
+/*     $NetBSD: fwohci.c,v 1.124 2010/04/19 07:00:58 kiyohara Exp $    */
 
 /*-
  * Copyright (c) 2003 Hidetoshi Shimokawa
@@ -37,7 +37,7 @@
  *
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.123 2010/03/29 07:34:02 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.124 2010/04/19 07:00:58 kiyohara Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -1689,12 +1689,12 @@
 static void
 fwohci_db_free(struct fwohci_softc *sc, struct fwohci_dbch *dbch)
 {
-       struct fwohcidb_tr *db_tr;
+       struct fwohcidb_tr *db_tr, *last;
 
        if ((dbch->flags & FWOHCI_DBCH_INIT) == 0)
                return;
 
-       for (db_tr = STAILQ_FIRST(&dbch->db_trq); db_tr != NULL;
+       for (last = db_tr = STAILQ_FIRST(&dbch->db_trq); db_tr != last;
            db_tr = STAILQ_NEXT(db_tr, link)) {
                bus_dmamap_destroy(sc->fc.dmat, db_tr->dma_map);
                if ((dbch->xferq.flag & FWXFERQ_EXTBUF) == 0 &&



Home | Main Index | Thread Index | Old Index