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: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Colin Ian King 2018-01-07 23:50:26 +00:00 committed by David S. Miller
parent 2b1eaa6635
commit 709af180ee
1 changed files with 1 additions and 1 deletions

View File

@ -501,7 +501,7 @@ static struct seg6_action_desc *__get_action_desc(int action)
struct seg6_action_desc *desc;
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++) {
desc = &seg6_action_table[i];
if (desc->action == action)