Commit 0273d101 authored by Guo Zhengkui's avatar Guo Zhengkui Committed by David S. Miller

selftests: net: fix array_size.cocci warning

Fit the following coccicheck warning:
tools/testing/selftests/net/reuseport_bpf_numa.c:89:28-29:
WARNING: Use ARRAY_SIZE.

It has been tested with gcc (Debian 8.3.0-6) 8.3.0 on x86_64.
Signed-off-by: default avatarGuo Zhengkui <guozhengkui@vivo.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0c1794c2
......@@ -86,7 +86,7 @@ static void attach_bpf(int fd)
memset(&attr, 0, sizeof(attr));
attr.prog_type = BPF_PROG_TYPE_SOCKET_FILTER;
attr.insn_cnt = sizeof(prog) / sizeof(prog[0]);
attr.insn_cnt = ARRAY_SIZE(prog);
attr.insns = (unsigned long) &prog;
attr.license = (unsigned long) &bpf_license;
attr.log_buf = (unsigned long) &bpf_log_buf;
......
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