Skip to content

Commit a5ed7ba

Browse files
mykyta5Kernel Patches Daemon
authored andcommitted
selftests/bpf: fix unintentional switch case fall through
Break from switch expression after parsing -n CLI argument in veristat, instead of falling through and enabling comparison mode. Fixes: a5c57f8 ("veristat: add ability to set BPF_F_TEST_SANITY_STRICT flag with -r flag") Signed-off-by: Mykyta Yatsenko <[email protected]> Acked-by: Yonghong Song <[email protected]>
1 parent 13e07b5 commit a5ed7ba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/testing/selftests/bpf/veristat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state)
364364
fprintf(stderr, "invalid top N specifier: %s\n", arg);
365365
argp_usage(state);
366366
}
367+
break;
367368
case 'C':
368369
env.comparison_mode = true;
369370
break;

0 commit comments

Comments
 (0)