Commit f157f9cb authored by Markus Elfring's avatar Markus Elfring Committed by Andrii Nakryiko

bpf: Simplify character output in seq_print_delegate_opts()

Single characters should be put into a sequence.
Thus use the corresponding function “seq_putc” for two selected calls.

This issue was transformed by using the Coccinelle software.
Suggested-by: default avatarChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/abde0992-3d71-44d2-ab27-75b382933a22@web.de
parent df862de4
...@@ -709,10 +709,10 @@ static void seq_print_delegate_opts(struct seq_file *m, ...@@ -709,10 +709,10 @@ static void seq_print_delegate_opts(struct seq_file *m,
msk = 1ULL << e->val; msk = 1ULL << e->val;
if (delegate_msk & msk) { if (delegate_msk & msk) {
/* emit lower-case name without prefix */ /* emit lower-case name without prefix */
seq_printf(m, "%c", first ? '=' : ':'); seq_putc(m, first ? '=' : ':');
name += pfx_len; name += pfx_len;
while (*name) { while (*name) {
seq_printf(m, "%c", tolower(*name)); seq_putc(m, tolower(*name));
name++; name++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment