Fix range check to actually test the variable that will be used as

an index later.

Submitted by:	Erich Stefan Boleyn <erich@uruk.org>
This commit is contained in:
Stefan Eßer 1996-05-18 17:32:20 +00:00
parent 7f5fe93fc7
commit 4beaf036a6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15812
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: pci.c,v 1.48 1996/04/14 20:14:36 se Exp $
** $Id: pci.c,v 1.49 1996/04/25 06:04:27 asami Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@ -1708,7 +1708,7 @@ void not_supported (pcici_t tag, u_long type)
printf(", class=0x%02x", class);
}
if (subclass < sizeof(subclasses) / sizeof(subclasses[0])) {
if (class < sizeof(subclasses) / sizeof(subclasses[0])) {
const subclass_name *p = subclasses[class];
while (p->name && (p->subclass != subclass))
p++;

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: pci.c,v 1.48 1996/04/14 20:14:36 se Exp $
** $Id: pci.c,v 1.49 1996/04/25 06:04:27 asami Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@ -1708,7 +1708,7 @@ void not_supported (pcici_t tag, u_long type)
printf(", class=0x%02x", class);
}
if (subclass < sizeof(subclasses) / sizeof(subclasses[0])) {
if (class < sizeof(subclasses) / sizeof(subclasses[0])) {
const subclass_name *p = subclasses[class];
while (p->name && (p->subclass != subclass))
p++;