aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-01-07 18:50:26 -0500
committerDavid S. Miller <davem@davemloft.net>2018-01-09 11:40:46 -0500
commit709af180eed51042eeae6c232d109d4c18e88c8e (patch)
tree77a6135874d44c80c9fcdf73d291d45783acb375
parent2b1eaa66352ac453b44451c230d8edd6c5a5ea80 (diff)
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>
-rw-r--r--net/ipv6/seg6_local.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c
index 825b8e01f947..ba3767ef5e93 100644
--- a/net/ipv6/seg6_local.c
+++ b/net/ipv6/seg6_local.c
@@ -501,7 +501,7 @@ static struct seg6_action_desc *__get_action_desc(int action)
501 struct seg6_action_desc *desc; 501 struct seg6_action_desc *desc;
502 int i, count; 502 int i, count;
503 503
504 count = sizeof(seg6_action_table) / sizeof(struct seg6_action_desc); 504 count = ARRAY_SIZE(seg6_action_table);
505 for (i = 0; i < count; i++) { 505 for (i = 0; i < count; i++) {
506 desc = &seg6_action_table[i]; 506 desc = &seg6_action_table[i];
507 if (desc->action == action) 507 if (desc->action == action)