mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
selftests/bpf: Fix uninitialized duration warning
Daniel Borkmann reports:
test_progs.c: In function ‘main’:
test_progs.c:81:3: warning: ‘duration’ may be used uninitialized in this function [-Wmaybe-uninitialized]
printf("%s:PASS:%s %d nsec\n", __func__, tag, duration);\
^~~~~~
test_progs.c:1706:8: note: ‘duration’ was declared here
__u32 duration;
^~~~~~~~
Signed-off-by: Joe Stringer <[email protected]>
Acked-by: Martin KaFai Lau <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
This commit is contained in:
parent
407be8d03e
commit
5c86d2125b
1 changed files with 1 additions and 1 deletions
|
|
@ -1703,7 +1703,7 @@ static void test_reference_tracking()
|
|||
const char *file = "./test_sk_lookup_kern.o";
|
||||
struct bpf_object *obj;
|
||||
struct bpf_program *prog;
|
||||
__u32 duration;
|
||||
__u32 duration = 0;
|
||||
int err = 0;
|
||||
|
||||
obj = bpf_object__open(file);
|
||||
|
|
|
|||
Loading…
Reference in a new issue