selftests/bpf: Fix uninitialized duration warning
authorJoe Stringer <joe@wand.net.nz>
Fri, 9 Nov 2018 18:18:16 +0000 (10:18 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 17 Nov 2018 01:40:10 +0000 (17:40 -0800)
commit5c86d2125b58949122e03f04ce940e6f5b8534ba
tree01acfe764ce488de7056a4ed00ed0f92a769f96d
parent407be8d03e20d70d15cd8c21591202a591e3c2b2
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 <joe@wand.net.nz>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_progs.c