netfilter: nf_log: Replace a seq_printf() call by seq_puts() in seq_show()
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 2 Jul 2019 18:06:30 +0000 (20:06 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 4 Jul 2019 00:29:48 +0000 (02:29 +0200)
A string which did not contain a data format specification should be put
into a sequence. Thus use the corresponding function “seq_puts”.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_log.c

index 3574a21..bb25d4c 100644 (file)
@@ -374,7 +374,7 @@ static int seq_show(struct seq_file *s, void *v)
                        continue;
 
                logger = nft_log_dereference(loggers[*pos][i]);
-               seq_printf(s, "%s", logger->name);
+               seq_puts(s, logger->name);
                if (i == 0 && loggers[*pos][i + 1] != NULL)
                        seq_puts(s, ",");