diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2023-03-31 15:24:05 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-04-01 09:05:57 -0700 |
commit | ebf390c9d0136e01f327439c012ab5741971e72d (patch) | |
tree | 2803ef80a0faed8242ca4dd8c8eec626197d8224 /tools/testing/selftests/bpf | |
parent | e3b65c0c1a5b8ed06818b7eeb0c44165ea817d52 (diff) | |
download | linux-ebf390c9d0136e01f327439c012ab5741971e72d.tar.gz linux-ebf390c9d0136e01f327439c012ab5741971e72d.tar.bz2 linux-ebf390c9d0136e01f327439c012ab5741971e72d.zip |
veristat: small fixed found in -O2 mode
Fix few potentially unitialized variables uses, found while building
veristat.c in release (-O2) mode.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20230331222405.3468634-5-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf')
-rw-r--r-- | tools/testing/selftests/bpf/veristat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/veristat.c b/tools/testing/selftests/bpf/veristat.c index e592d05bccb2..53d7ec168268 100644 --- a/tools/testing/selftests/bpf/veristat.c +++ b/tools/testing/selftests/bpf/veristat.c @@ -810,7 +810,7 @@ static int guess_prog_type_by_ctx_name(const char *ctx_name, enum bpf_prog_type prog_type; enum bpf_attach_type attach_type; } ctx_map[] = { - /* __sk_buff is most ambiguous, for now we assume cgroup_skb */ + /* __sk_buff is most ambiguous, we assume TC program */ { "__sk_buff", "sk_buff", BPF_PROG_TYPE_SCHED_CLS }, { "bpf_sock", "sock", BPF_PROG_TYPE_CGROUP_SOCK, BPF_CGROUP_INET4_POST_BIND }, { "bpf_sock_addr", "bpf_sock_addr_kern", BPF_PROG_TYPE_CGROUP_SOCK_ADDR, BPF_CGROUP_INET4_BIND }, @@ -1045,6 +1045,7 @@ static int process_obj(const char *filename) goto cleanup; } + lprog = NULL; bpf_object__for_each_program(tprog, tobj) { const char *tprog_name = bpf_program__name(tprog); @@ -1855,6 +1856,7 @@ static int handle_comparison_mode(void) one_more_time: output_comp_headers(cur_fmt); + last_idx = -1; for (i = 0; i < env.join_stat_cnt; i++) { const struct verif_stats_join *join = &env.join_stats[i]; |