diff mbox series

netfilter: nf_log: Replace a seq_printf() call by seq_puts() in seq_show()

Message ID c7d397c8-4f41-1831-505f-b3fbcc3663fb@web.de
State Awaiting Upstream
Delegated to: David Miller
Headers show
Series netfilter: nf_log: Replace a seq_printf() call by seq_puts() in seq_show() | expand

Commit Message

Markus Elfring July 2, 2019, 6:11 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 2 Jul 2019 20:06:30 +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>
---
 net/netfilter/nf_log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.22.0

Comments

Pablo Neira Ayuso July 3, 2019, 11:38 a.m. UTC | #1
On Tue, Jul 02, 2019 at 08:11:53PM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 2 Jul 2019 20:06:30 +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.

Applied, thanks.
diff mbox series

Patch

diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index 3574a212bdc2..bb25d4c794c7 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -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, ",");