Commit 709af180 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

ipv6: use ARRAY_SIZE for array sizing calculation on array seg6_action_table

Use the ARRAY_SIZE macro on array seg6_action_table to determine size of
the array. Improvement suggested by coccinelle.
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2b1eaa66
...@@ -501,7 +501,7 @@ static struct seg6_action_desc *__get_action_desc(int action) ...@@ -501,7 +501,7 @@ static struct seg6_action_desc *__get_action_desc(int action)
struct seg6_action_desc *desc; struct seg6_action_desc *desc;
int i, count; int i, count;
count = sizeof(seg6_action_table) / sizeof(struct seg6_action_desc); count = ARRAY_SIZE(seg6_action_table);
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
desc = &seg6_action_table[i]; desc = &seg6_action_table[i];
if (desc->action == action) if (desc->action == action)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment