summaryrefslogtreecommitdiff
path: root/drivers/isdn/act2000/capi.c
diff options
context:
space:
mode:
authorKarsten Keil <keil@b1-systems.de>2009-07-24 16:26:08 (GMT)
committerKarsten Keil <keil@b1-systems.de>2009-07-25 18:23:05 (GMT)
commitba2d6ccb1df6ebb2c1b2322518ce7be25c1e3469 (patch)
tree1c454520cbef80d0fdc314104766d2ff0ccd0212 /drivers/isdn/act2000/capi.c
parent3cad3da3ed9ece03704f7d67e038b8ae710fa312 (diff)
downloadlinux-ba2d6ccb1df6ebb2c1b2322518ce7be25c1e3469.tar.xz
ISDN: ARRAY_SIZE changes
These changes were a direct result of using a semantic patch More information can be found at http://www.emn.fr/x-info/coccinelle/ Modified some of the changes to avoid the extra define. Signed-off-by: Stoyan Gaydarov <sgayda2@uiuc.edu> Signed-off-by: Karsten Keil <keil@b1-systems.de>
Diffstat (limited to 'drivers/isdn/act2000/capi.c')
-rw-r--r--drivers/isdn/act2000/capi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/isdn/act2000/capi.c b/drivers/isdn/act2000/capi.c
index 946c38c..1f0a949 100644
--- a/drivers/isdn/act2000/capi.c
+++ b/drivers/isdn/act2000/capi.c
@@ -78,7 +78,6 @@ static actcapi_msgdsc valid_msg[] = {
#endif
{{ 0x00, 0x00}, NULL},
};
-#define num_valid_msg (sizeof(valid_msg)/sizeof(actcapi_msgdsc))
#define num_valid_imsg 27 /* MANUFACTURER_IND */
/*
@@ -1025,7 +1024,7 @@ actcapi_debug_msg(struct sk_buff *skb, int direction)
#ifdef DEBUG_DUMP_SKB
dump_skb(skb);
#endif
- for (i = 0; i < num_valid_msg; i++)
+ for (i = 0; i < ARRAY_SIZE(valid_msg); i++)
if ((msg->hdr.cmd.cmd == valid_msg[i].cmd.cmd) &&
(msg->hdr.cmd.subcmd == valid_msg[i].cmd.subcmd)) {
descr = valid_msg[i].description;