tools: bpftool: remove unnecessary 'if' to reduce indentation

It is obvious we could use 'else if' instead of start a new 'if' in the
touched code.

Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
Jiong Wang 2018-03-01 18:01:16 -08:00 committed by Alexei Starovoitov
parent c8745e07d5
commit 3197239d24

View File

@ -777,8 +777,7 @@ static int do_dump(int argc, char **argv)
if (json_output)
jsonw_null(json_wtr);
} else {
if (member_len == &info.jited_prog_len) {
} else if (member_len == &info.jited_prog_len) {
const char *name = NULL;
if (info.ifindex) {
@ -798,7 +797,6 @@ static int do_dump(int argc, char **argv)
dump_xlated_plain(&dd, buf, *member_len, opcodes);
kernel_syms_destroy(&dd);
}
}
free(buf);
return 0;