diff options
author | Quentin Monnet <quentin@isovalent.com> | 2023-07-12 16:23:22 +0100 |
---|---|---|
committer | Quentin Monnet <qmonnet+github@qoba.lt> | 2023-08-29 12:34:13 +0100 |
commit | 292509404c9b6b7483cbfb08d5abe45acbdd7ea1 (patch) | |
tree | adedd2fae5ea6d633c7a666fa662977a28c8bfc0 | |
parent | 7561b06a007412e9dc20a470ee848d14e533996d (diff) | |
download | bpftool-292509404c9b6b7483cbfb08d5abe45acbdd7ea1.tar.gz |
bpftool: Use "fallthrough;" keyword instead of comments
After using "__fallthrough;" in a switch/case block in bpftool's
btf_dumper.c [0], and then turning it into a comment [1] to prevent a
merge conflict in linux-next when the keyword was changed into just
"fallthrough;" [2], we can now drop the comment and use the new keyword,
no underscores.
Also update the other occurrence of "/* fallthrough */" in bpftool.
[0] commit 9fd496848b1c ("bpftool: Support inline annotations when dumping the CFG of a program")
[1] commit 4b7ef71ac977 ("bpftool: Replace "__fallthrough" by a comment to address merge conflict")
[2] commit f7a858bffcdd ("tools: Rename __fallthrough to fallthrough")
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230712152322.81758-1-quentin@isovalent.com
-rw-r--r-- | src/btf_dumper.c | 2 | ||||
-rw-r--r-- | src/feature.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/btf_dumper.c b/src/btf_dumper.c index 294de23..1b7f697 100644 --- a/src/btf_dumper.c +++ b/src/btf_dumper.c @@ -835,7 +835,7 @@ static void dotlabel_puts(const char *s) case '|': case ' ': putchar('\\'); - /* fallthrough */ + fallthrough; default: putchar(*s); } diff --git a/src/feature.c b/src/feature.c index 0675d6a..edda4fc 100644 --- a/src/feature.c +++ b/src/feature.c @@ -757,7 +757,7 @@ probe_helpers_for_progtype(enum bpf_prog_type prog_type, case BPF_FUNC_probe_write_user: if (!full_mode) continue; - /* fallthrough */ + fallthrough; default: probe_res |= probe_helper_for_progtype(prog_type, supported_type, define_prefix, id, prog_type_str, |