Skip to content

Commit

Permalink
[PATCH] isdn/capi: use ARRAY_SIZE when appropriate
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Ahmed S. Darwish authored and Linus Torvalds committed Feb 12, 2007
1 parent fc238b3 commit fd863db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/isdn/capi/capi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,7 @@ static struct procfsentries {

static void __init proc_init(void)
{
int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
int nelem = ARRAY_SIZE(procfsentries);
int i;

for (i=0; i < nelem; i++) {
Expand All @@ -1468,7 +1468,7 @@ static void __init proc_init(void)

static void __exit proc_exit(void)
{
int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
int nelem = ARRAY_SIZE(procfsentries);
int i;

for (i=nelem-1; i >= 0; i--) {
Expand Down
4 changes: 2 additions & 2 deletions drivers/isdn/capi/capidrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2218,7 +2218,7 @@ static struct procfsentries {

static void __init proc_init(void)
{
int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
int nelem = ARRAY_SIZE(procfsentries);
int i;

for (i=0; i < nelem; i++) {
Expand All @@ -2230,7 +2230,7 @@ static void __init proc_init(void)

static void __exit proc_exit(void)
{
int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
int nelem = ARRAY_SIZE(procfsentries);
int i;

for (i=nelem-1; i >= 0; i--) {
Expand Down

0 comments on commit fd863db

Please sign in to comment.