Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Fix use of uninitialized variable. Missed by gc...



details:   https://anonhg.NetBSD.org/src/rev/c9ec2a6b333b
branches:  trunk
changeset: 514366:c9ec2a6b333b
user:      briggs <briggs%NetBSD.org@localhost>
date:      Fri Aug 31 01:00:16 2001 +0000

description:
Fix use of uninitialized variable.  Missed by gcc, spotted by enami.

diffstat:

 sys/dev/pci/pciconf.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 93091aae4718 -r c9ec2a6b333b sys/dev/pci/pciconf.c
--- a/sys/dev/pci/pciconf.c     Fri Aug 31 00:31:07 2001 +0000
+++ b/sys/dev/pci/pciconf.c     Fri Aug 31 01:00:16 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciconf.c,v 1.8 2001/08/30 02:52:41 briggs Exp $       */
+/*     $NetBSD: pciconf.c,v 1.9 2001/08/31 01:00:16 briggs Exp $       */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -803,8 +803,8 @@
                }
                iohigh = 0;
        }
-       io &= (PCI_BRIDGE_STATIO_STATUS_MASK <<
-           PCI_BRIDGE_STATIO_STATUS_SHIFT);
+       io = pci_conf_read(pb->pc, pd->tag, PCI_BRIDGE_STATIO_REG) &
+           (PCI_BRIDGE_STATIO_STATUS_MASK << PCI_BRIDGE_STATIO_STATUS_SHIFT);
        io |= (((io_base >> 8) & PCI_BRIDGE_STATIO_IOBASE_MASK)
            << PCI_BRIDGE_STATIO_IOBASE_SHIFT);
        io |= (((io_limit >> 8) & PCI_BRIDGE_STATIO_IOLIMIT_MASK)



Home | Main Index | Thread Index | Old Index