summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-04-07 05:59:50 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-04-07 05:59:50 +0000
commit2866c6445e55332824efd127a180215b7bdff177 (patch)
treebcc0da8e3ef41db59d8bb15be2b5510be4e09948 /sys/dev/pci
parentd38cab9760f6c9263a0fd8393a67c2ac1b7ef595 (diff)
sizeofa will give us the number of elements in an array. use it when
iterating over the pci device ids.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/sili_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/sili_pci.c b/sys/dev/pci/sili_pci.c
index 3a98b894d0e..a0fec08b48c 100644
--- a/sys/dev/pci/sili_pci.c
+++ b/sys/dev/pci/sili_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sili_pci.c,v 1.6 2007/04/06 01:04:52 jsg Exp $ */
+/* $OpenBSD: sili_pci.c,v 1.7 2007/04/07 05:59:49 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -75,7 +75,7 @@ sili_lookup(struct pci_attach_args *pa)
int i;
const struct sili_device *sd;
- for (i = 0; i < (sizeof(sili_devices) / sizeof(sili_devices[0])); i++) {
+ for (i = 0; i < sizeofa(sili_devices); i++) {
sd = &sili_devices[i];
if (sd->sd_vendor == PCI_VENDOR(pa->pa_id) &&
sd->sd_product == PCI_PRODUCT(pa->pa_id))