Pārlūkot izejas kodu

[IPV4] af_inet.c: use ARRAY_SIZE macro from kernel.h instead

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Denis Cheng 17 gadi atpakaļ
vecāks
revīzija
c40f6fff40
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      net/ipv4/af_inet.c

+ 1 - 1
net/ipv4/af_inet.c

@@ -942,7 +942,7 @@ static struct inet_protosw inetsw_array[] =
        }
        }
 };
 };
 
 
-#define INETSW_ARRAY_LEN (sizeof(inetsw_array) / sizeof(struct inet_protosw))
+#define INETSW_ARRAY_LEN ARRAY_SIZE(inetsw_array)
 
 
 void inet_register_protosw(struct inet_protosw *p)
 void inet_register_protosw(struct inet_protosw *p)
 {
 {