diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-12-10 16:35:29 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-12-10 16:35:29 +0000 |
commit | f62320e42891733e9ee8bf661e6fc26a503ccfd6 (patch) | |
tree | 6c159927b74f84176e9fea0b4a3c0519f0aeb2fa /sys/dev/wscons/wskbdutil.c | |
parent | 14e9b6c5251ab3959e0d049d9be8af005b1c7602 (diff) |
a few sizeof(array)/sizeof(array[0]) -> nitems(array) conversions found while
looking for something else.
sha1(1) tells me there's no binary change.
Diffstat (limited to 'sys/dev/wscons/wskbdutil.c')
-rw-r--r-- | sys/dev/wscons/wskbdutil.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/wscons/wskbdutil.c b/sys/dev/wscons/wskbdutil.c index 7fb7a5af572..afeea7ef45e 100644 --- a/sys/dev/wscons/wskbdutil.c +++ b/sys/dev/wscons/wskbdutil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wskbdutil.c,v 1.7 2008/06/26 05:42:19 ray Exp $ */ +/* $OpenBSD: wskbdutil.c,v 1.8 2009/12/10 16:35:28 oga Exp $ */ /* $NetBSD: wskbdutil.c,v 1.7 1999/12/21 11:59:13 drochner Exp $ */ /*- @@ -174,7 +174,7 @@ static struct compose_tab_s { { { KS_acute, KS_y }, KS_yacute } }; -#define COMPOSE_SIZE sizeof(compose_tab)/sizeof(compose_tab[0]) +#define COMPOSE_SIZE nitems(compose_tab) static int compose_tab_inorder = 0; @@ -428,7 +428,7 @@ wskbd_load_keymap(mapdata, map, maplen) mp++; } - if (stack_ptr == sizeof(stack)/sizeof(stack[0])) + if (stack_ptr == nitems(stack)) panic("wskbd_load_keymap: %d: recursion too deep", mapdata->layout); if (mp->map_size <= 0) |