diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pcmcia/aic_pcmcia.c | 4 | ||||
-rw-r--r-- | sys/dev/pcmcia/com_pcmcia.c | 5 | ||||
-rw-r--r-- | sys/dev/pcmcia/esp_pcmcia.c | 4 | ||||
-rw-r--r-- | sys/dev/pcmcia/if_ep_pcmcia.c | 4 | ||||
-rw-r--r-- | sys/dev/pcmcia/if_sm_pcmcia.c | 4 | ||||
-rw-r--r-- | sys/dev/pcmcia/pcmcia_cis_quirks.c | 4 | ||||
-rw-r--r-- | sys/dev/pcmcia/wdc_pcmcia.c | 4 |
7 files changed, 14 insertions, 15 deletions
diff --git a/sys/dev/pcmcia/aic_pcmcia.c b/sys/dev/pcmcia/aic_pcmcia.c index 2a56ef686c1..dddf51a3887 100644 --- a/sys/dev/pcmcia/aic_pcmcia.c +++ b/sys/dev/pcmcia/aic_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic_pcmcia.c,v 1.15 2006/06/03 01:51:54 martin Exp $ */ +/* $OpenBSD: aic_pcmcia.c,v 1.16 2011/03/31 13:05:27 jasper Exp $ */ /* $NetBSD: aic_pcmcia.c,v 1.6 1998/07/19 17:28:15 christos Exp $ */ /* @@ -90,7 +90,7 @@ aic_pcmcia_match(parent, match, aux) struct pcmcia_attach_args *pa = aux; int i; - for (i = 0; i < sizeof(aic_pcmcia_prod)/sizeof(aic_pcmcia_prod[0]); i++) + for (i = 0; i < nitems(aic_pcmcia_prod); i++) if (pa->manufacturer == aic_pcmcia_prod[i].app_vendor && pa->product == aic_pcmcia_prod[i].app_product && pa->pf->number == aic_pcmcia_prod[i].app_expfunc) diff --git a/sys/dev/pcmcia/com_pcmcia.c b/sys/dev/pcmcia/com_pcmcia.c index daaae7816ba..db0aa04503f 100644 --- a/sys/dev/pcmcia/com_pcmcia.c +++ b/sys/dev/pcmcia/com_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_pcmcia.c,v 1.51 2010/08/30 20:33:18 deraadt Exp $ */ +/* $OpenBSD: com_pcmcia.c,v 1.52 2011/03/31 13:05:27 jasper Exp $ */ /* $NetBSD: com_pcmcia.c,v 1.15 1998/08/22 17:47:58 msaitoh Exp $ */ /* @@ -189,8 +189,7 @@ com_pcmcia_match(parent, match, aux) return 1; /* 3. Is this a card we know about? */ - for (i = 0; i < sizeof(com_pcmcia_prod)/sizeof(com_pcmcia_prod[0]); - i++) { + for (i = 0; i < nitems(com_pcmcia_prod); i++) { for (j = 0; j < 4; j++) if (com_pcmcia_prod[i].cis1_info[j] && pa->card->cis1_info[j] && diff --git a/sys/dev/pcmcia/esp_pcmcia.c b/sys/dev/pcmcia/esp_pcmcia.c index 026b04a21fc..752cb7fd198 100644 --- a/sys/dev/pcmcia/esp_pcmcia.c +++ b/sys/dev/pcmcia/esp_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esp_pcmcia.c,v 1.9 2010/06/28 18:31:02 krw Exp $ */ +/* $OpenBSD: esp_pcmcia.c,v 1.10 2011/03/31 13:05:27 jasper Exp $ */ /* $NetBSD: esp_pcmcia.c,v 1.8 2000/06/05 15:36:45 tsutsui Exp $ */ /*- @@ -137,7 +137,7 @@ esp_pcmcia_match(parent, match, aux) struct pcmcia_attach_args *pa = aux; int i; - for (i = 0; i < sizeof(esp_pcmcia_prod)/sizeof(esp_pcmcia_prod[0]); i++) + for (i = 0; i < nitems(esp_pcmcia_prod); i++) if (pa->manufacturer == esp_pcmcia_prod[i].app_vendor && pa->product == esp_pcmcia_prod[i].app_product && pa->pf->number == esp_pcmcia_prod[i].app_expfunc) diff --git a/sys/dev/pcmcia/if_ep_pcmcia.c b/sys/dev/pcmcia/if_ep_pcmcia.c index 1b9f3222b4e..35690e09687 100644 --- a/sys/dev/pcmcia/if_ep_pcmcia.c +++ b/sys/dev/pcmcia/if_ep_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ep_pcmcia.c,v 1.39 2010/08/30 20:33:18 deraadt Exp $ */ +/* $OpenBSD: if_ep_pcmcia.c,v 1.40 2011/03/31 13:05:27 jasper Exp $ */ /* $NetBSD: if_ep_pcmcia.c,v 1.16 1998/08/17 23:20:40 thorpej Exp $ */ /*- @@ -168,7 +168,7 @@ ep_pcmcia_lookup(pa) { int i; - for (i = 0; i < sizeof(ep_pcmcia_prod)/sizeof(ep_pcmcia_prod[0]); i++) + for (i = 0; i < nitems(ep_pcmcia_prod); i++) if (pa->product == ep_pcmcia_prod[i].epp_product && pa->pf->number == ep_pcmcia_prod[i].epp_expfunc) return &ep_pcmcia_prod[i]; diff --git a/sys/dev/pcmcia/if_sm_pcmcia.c b/sys/dev/pcmcia/if_sm_pcmcia.c index a6327cd7204..b2d8b282369 100644 --- a/sys/dev/pcmcia/if_sm_pcmcia.c +++ b/sys/dev/pcmcia/if_sm_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sm_pcmcia.c,v 1.30 2010/08/30 20:33:18 deraadt Exp $ */ +/* $OpenBSD: if_sm_pcmcia.c,v 1.31 2011/03/31 13:05:27 jasper Exp $ */ /* $NetBSD: if_sm_pcmcia.c,v 1.11 1998/08/15 20:47:32 thorpej Exp $ */ /*- @@ -128,7 +128,7 @@ sm_pcmcia_match(parent, match, aux) struct pcmcia_attach_args *pa = aux; int i; - for (i = 0; i < sizeof(sm_pcmcia_prod)/sizeof(sm_pcmcia_prod[0]); i++) + for (i = 0; i < nitems(sm_pcmcia_prod); i++) if (pa->manufacturer == sm_pcmcia_prod[i].spp_vendor && pa->product == sm_pcmcia_prod[i].spp_product && pa->pf->number == sm_pcmcia_prod[i].spp_expfunc) diff --git a/sys/dev/pcmcia/pcmcia_cis_quirks.c b/sys/dev/pcmcia/pcmcia_cis_quirks.c index e003cddcf11..93789b7aa24 100644 --- a/sys/dev/pcmcia/pcmcia_cis_quirks.c +++ b/sys/dev/pcmcia/pcmcia_cis_quirks.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcmcia_cis_quirks.c,v 1.8 2005/10/27 16:42:19 deraadt Exp $ */ +/* $OpenBSD: pcmcia_cis_quirks.c,v 1.9 2011/03/31 13:05:27 jasper Exp $ */ /* $NetBSD: pcmcia_cis_quirks.c,v 1.3 1998/12/29 09:00:28 marc Exp $ */ /* @@ -220,7 +220,7 @@ void pcmcia_check_cis_quirks(sc) pf_last = NULL; - for (i = 0; i < sizeof(pcmcia_cis_quirks)/sizeof(pcmcia_cis_quirks[0]); + for (i = 0; i < nitems(pcmcia_cis_quirks); i++) { if ((sc->card.manufacturer == pcmcia_cis_quirks[i].manufacturer) && (sc->card.product == pcmcia_cis_quirks[i].product) && diff --git a/sys/dev/pcmcia/wdc_pcmcia.c b/sys/dev/pcmcia/wdc_pcmcia.c index b4d10b57bd3..04e484a211d 100644 --- a/sys/dev/pcmcia/wdc_pcmcia.c +++ b/sys/dev/pcmcia/wdc_pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc_pcmcia.c,v 1.24 2010/08/31 17:13:47 deraadt Exp $ */ +/* $OpenBSD: wdc_pcmcia.c,v 1.25 2011/03/31 13:05:27 jasper Exp $ */ /* $NetBSD: wdc_pcmcia.c,v 1.19 1999/02/19 21:49:43 abs Exp $ */ /*- @@ -192,7 +192,7 @@ wdc_pcmcia_lookup(pa) int i, cis_match; for (wpp = wdc_pcmcia_pr; - wpp < &wdc_pcmcia_pr[sizeof(wdc_pcmcia_pr)/sizeof(wdc_pcmcia_pr[0])]; + wpp < &wdc_pcmcia_pr[nitems(wdc_pcmcia_pr)]; wpp++) if ((wpp->wpp_vendor == PCMCIA_VENDOR_INVALID || pa->manufacturer == wpp->wpp_vendor) && |