Re: [PATCH v1] selftests/bpf: fix application of sizeof to pointer

2024-11-18 Thread Cong Wang
On Sun, Nov 17, 2024 at 11:18:38AM +0800, guanjing wrote: > sizeof when applied to a pointer typed expression gives the size of > the pointer. > > tools/testing/selftests/bpf/progs/test_tunnel_kern.c:678:41-47: ERROR: > application of sizeof to pointer > > The proper fix in this particular case

[PATCH v1] selftests/bpf: fix application of sizeof to pointer

2024-11-18 Thread guanjing
sizeof when applied to a pointer typed expression gives the size of the pointer. tools/testing/selftests/bpf/progs/test_tunnel_kern.c:678:41-47: ERROR: application of sizeof to pointer The proper fix in this particular case is to code sizeof(*gopt) instead of sizeof(gopt). This issue was detect