samples/bpf: Fix application of sizeof to pointer
authorDavid Yang <davidcomponentone@gmail.com>
Tue, 12 Oct 2021 11:16:49 +0000 (19:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:18 +0000 (19:16 +0100)
commit3d890ac58a855a5a92518e9f4b5f3b224bf2f1f1
tree6456db7f53c368472baef52d2dbb8ea2820d6dc8
parent54718ee9b8eed43ab5e20df936a6e638416a4bcf
samples/bpf: Fix application of sizeof to pointer

[ Upstream commit b599015f044df53e93ad0a2957b615bc1a26bf73 ]

The coccinelle check report:
"./samples/bpf/xdp_redirect_cpu_user.c:397:32-38:
ERROR: application of sizeof to pointer"
Using the "strlen" to fix it.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: David Yang <davidcomponentone@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211012111649.983253-1-davidcomponentone@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
samples/bpf/xdp_redirect_cpu_user.c