selftests: net: fix array_size.cocci warning
authorGuo Zhengkui <guozhengkui@vivo.com>
Wed, 16 Mar 2022 09:28:57 +0000 (17:28 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 17 Mar 2022 14:21:16 +0000 (15:21 +0100)
commit1abea24af42c35c6eb537e4402836e2cde2a5b13
tree431b689970b3d514588729d863cca40a4d1eaf7a
parent58e06d05d43a9e37e121edabaada00a9d844444c
selftests: net: fix array_size.cocci warning

Fix array_size.cocci warning in tools/testing/selftests/net.

Use `ARRAY_SIZE(arr)` instead of forms like `sizeof(arr)/sizeof(arr[0])`.

It has been tested with gcc (Debian 8.3.0-6) 8.3.0.

Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Link: https://lore.kernel.org/r/20220316092858.9398-1-guozhengkui@vivo.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/cmsg_sender.c
tools/testing/selftests/net/psock_fanout.c
tools/testing/selftests/net/toeplitz.c