Skip to content

Commit

Permalink
samples/bpf: Drop unnecessary fallthrough
Browse files Browse the repository at this point in the history
__fallthrough is now not supported. Instead of renaming it to
now-canonical ([0]) fallthrough pseudo-keyword, just get rid of it and
equate 'h' case to default case, as both emit usage information and
succeed.

  [0] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20230516001718.317177-1-andrii@kernel.org
  • Loading branch information
Andrii Nakryiko authored and Daniel Borkmann committed May 16, 2023
1 parent e1505c1 commit a820ca1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion samples/bpf/hbm.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ int main(int argc, char **argv)
"Option -%c requires an argument.\n\n",
optopt);
case 'h':
__fallthrough;
default:
Usage();
return 0;
Expand Down

0 comments on commit a820ca1

Please sign in to comment.