summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2008-11-25 22:20:12 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2008-11-25 22:20:12 +0000
commit73e92816f965abe7bed854402453e8a568f802c1 (patch)
treeed9977adebb411d6fa247604fcee47dfdd7f58e3 /sys
parentd69871e8580da6ee2c3f62ac8cea87938e65dedc (diff)
more sizeof->nitems
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/cardbus/if_ral_cardbus.c5
-rw-r--r--sys/dev/pci/if_iwi.c4
-rw-r--r--sys/dev/pci/if_iwn.c4
-rw-r--r--sys/dev/pci/if_ral_pci.c4
-rw-r--r--sys/dev/pci/if_wpi.c4
5 files changed, 10 insertions, 11 deletions
diff --git a/sys/dev/cardbus/if_ral_cardbus.c b/sys/dev/cardbus/if_ral_cardbus.c
index 8c5577a49dd..c7f9a480db2 100644
--- a/sys/dev/cardbus/if_ral_cardbus.c
+++ b/sys/dev/cardbus/if_ral_cardbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral_cardbus.c,v 1.11 2008/07/21 19:41:44 damien Exp $ */
+/* $OpenBSD: if_ral_cardbus.c,v 1.12 2008/11/25 22:20:11 damien Exp $ */
/*-
* Copyright (c) 2005-2007
@@ -126,8 +126,7 @@ int
ral_cardbus_match(struct device *parent, void *match, void *aux)
{
return (cardbus_matchbyid((struct cardbus_attach_args *)aux,
- ral_cardbus_devices,
- sizeof (ral_cardbus_devices) / sizeof (ral_cardbus_devices[0])));
+ ral_cardbus_devices, nitems(ral_cardbus_devices)));
}
void
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index 69a826cfc92..c77a4073bb5 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.95 2008/11/25 21:43:57 damien Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.96 2008/11/25 22:20:11 damien Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -149,7 +149,7 @@ int
iwi_match(struct device *parent, void *match, void *aux)
{
return pci_matchbyid((struct pci_attach_args *)aux, iwi_devices,
- sizeof (iwi_devices) / sizeof (iwi_devices[0]));
+ nitems(iwi_devices));
}
/* Base Address Register */
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index 1933e9515ba..6f6c33b9180 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.39 2008/11/25 21:43:57 damien Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.40 2008/11/25 22:20:11 damien Exp $ */
/*-
* Copyright (c) 2007, 2008
@@ -304,7 +304,7 @@ int
iwn_match(struct device *parent, void *match, void *aux)
{
return pci_matchbyid((struct pci_attach_args *)aux, iwn_devices,
- sizeof iwn_devices / sizeof iwn_devices[0]);
+ nitems(iwn_devices));
}
void
diff --git a/sys/dev/pci/if_ral_pci.c b/sys/dev/pci/if_ral_pci.c
index e52e1a782f3..eaf45033441 100644
--- a/sys/dev/pci/if_ral_pci.c
+++ b/sys/dev/pci/if_ral_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral_pci.c,v 1.13 2008/07/21 19:41:44 damien Exp $ */
+/* $OpenBSD: if_ral_pci.c,v 1.14 2008/11/25 22:20:11 damien Exp $ */
/*-
* Copyright (c) 2005-2007
@@ -119,7 +119,7 @@ int
ral_pci_match(struct device *parent, void *match, void *aux)
{
return (pci_matchbyid((struct pci_attach_args *)aux, ral_pci_devices,
- sizeof (ral_pci_devices) / sizeof (ral_pci_devices[0])));
+ nitems(ral_pci_devices)));
}
void
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c
index 730ae5d9ab3..6e32ad56161 100644
--- a/sys/dev/pci/if_wpi.c
+++ b/sys/dev/pci/if_wpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wpi.c,v 1.75 2008/11/25 21:43:57 damien Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.76 2008/11/25 22:20:11 damien Exp $ */
/*-
* Copyright (c) 2006-2008
@@ -176,7 +176,7 @@ int
wpi_match(struct device *parent, void *match, void *aux)
{
return pci_matchbyid((struct pci_attach_args *)aux, wpi_devices,
- sizeof wpi_devices / sizeof wpi_devices[0]);
+ nitems(wpi_devices));
}
void