Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/marvell Fix use of an uninitialised variabl...



details:   https://anonhg.NetBSD.org/src/rev/a326fd3210be
branches:  trunk
changeset: 546464:a326fd3210be
user:      scw <scw%NetBSD.org@localhost>
date:      Tue Apr 29 15:11:45 2003 +0000

description:
Fix use of an uninitialised variable. This was harmless, other than
spuriously incrementing an interrupt counter.

diffstat:

 sys/arch/powerpc/marvell/extintr.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r ef9b83a8bc66 -r a326fd3210be sys/arch/powerpc/marvell/extintr.c
--- a/sys/arch/powerpc/marvell/extintr.c        Tue Apr 29 15:04:41 2003 +0000
+++ b/sys/arch/powerpc/marvell/extintr.c        Tue Apr 29 15:11:45 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extintr.c,v 1.8 2003/04/26 22:07:16 wiz Exp $  */
+/*     $NetBSD: extintr.c,v 1.9 2003/04/29 15:11:45 scw Exp $  */
 
 /*
  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -747,19 +747,19 @@
                        is->is_evcnt.ev_count++;
                        EXT_INTR_STATS_PRE(irq, tstart);
                        for (ih = is->is_hand; ih != NULL; ih = ih->ih_next) {
-                               int rv;
+                               if (ih->ih_flags & IH_ACTIVE) {
+                                       int rv;
 
-                               if (ih->ih_flags & IH_ACTIVE) {
                                        if (irq >= SIR_BASE)
                                                ih->ih_flags &= ~IH_ACTIVE;
                                        (void)extintr_enable();
                                        rv = (*ih->ih_fun)(ih->ih_arg);
                                        (void)extintr_disable();
+                                       if (rv != 0)
+                                               ih->ih_count++;
                                }
 
                                KASSERT(ci->ci_cpl == ipl);
-                               if (rv != 0)
-                                       ih->ih_count++;
                        }
                        EXT_INTR_STATS_POST(irq, tstart);
                        if (irq >= ICU_LEN)



Home | Main Index | Thread Index | Old Index