diff options
author | kernel test robot <lkp@intel.com> | 2022-01-22 12:09:44 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2022-01-24 17:11:39 +0100 |
commit | ed8bb03222c965290026c8ead5a902f4140f5440 (patch) | |
tree | 4563f5479d7855233a11515ee8f11ac1dcb98664 /net/bpf | |
parent | a9921ce1cae55f3c238b8c90d878b20a506b85c3 (diff) |
bpf: Fix flexible_array.cocci warnings
Zero-length and one-element arrays are deprecated, see:
Documentation/process/deprecated.rst
Flexible-array members should be used instead.
Generated by: scripts/coccinelle/misc/flexible_array.cocci
Fixes: c1ff181ffabc ("selftests/bpf: Extend kfunc selftests")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/bpf/alpine.DEB.2.22.394.2201221206320.12220@hadrien
Diffstat (limited to 'net/bpf')
-rw-r--r-- | net/bpf/test_run.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c index 541933abd16f..65b52b4bd6e1 100644 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -324,7 +324,7 @@ struct prog_test_fail2 { struct prog_test_fail3 { int len; char arr1[2]; - char arr2[0]; + char arr2[]; }; noinline void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb) |