diff options
| author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-21 15:38:28 +0000 |
|---|---|---|
| committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-21 15:38:28 +0000 |
| commit | 8dfea46460a0befc49458e87d2078a5ca100e0eb (patch) | |
| tree | 45622d9ce5a6c394316a37f672cfd0a033c48374 /sys/dev/sge | |
| parent | c3f2d05727060ba4cca2b26bed476aa5be57e9cb (diff) | |
Notes
Diffstat (limited to 'sys/dev/sge')
| -rw-r--r-- | sys/dev/sge/if_sge.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/sge/if_sge.c b/sys/dev/sge/if_sge.c index f0ef07fcb52c..9aefce1e32e5 100644 --- a/sys/dev/sge/if_sge.c +++ b/sys/dev/sge/if_sge.c @@ -276,9 +276,8 @@ sge_get_mac_addr_apc(struct sge_softc *sc, uint8_t *dest) { SIS_VENDORID, 0x0968 } }; uint8_t reg; - int busnum, cnt, i, j, numkids; + int busnum, i, j, numkids; - cnt = sizeof(apc_tbls) / sizeof(apc_tbls[0]); pci = devclass_find("pci"); for (busnum = 0; busnum < devclass_get_maxunit(pci); busnum++) { bus = devclass_get_device(pci, busnum); @@ -291,7 +290,7 @@ sge_get_mac_addr_apc(struct sge_softc *sc, uint8_t *dest) if (pci_get_class(dev) == PCIC_BRIDGE && pci_get_subclass(dev) == PCIS_BRIDGE_ISA) { tp = apc_tbls; - for (j = 0; j < cnt; j++) { + for (j = 0; j < nitems(apc_tbls); j++) { if (pci_get_vendor(dev) == tp->vid && pci_get_device(dev) == tp->did) { free(kids, M_TEMP); |
