Skip to contentSkip to conversation

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

PATCH Applied Markus Elfring 2 participants 2 messages Jul 2, 2019 – Jul 3, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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

From: Markus Elfring <[email protected]>
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.

---
 net/netfilter/nf_log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_log.c +1 -1
index 3574a212bdc2..bb25d4c794c7 100644
@@ -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, ",");
 

--
2.22.0

maintainer Applied
#1 lore raw
Quoted 7 lines · Markus Elfring

From: Markus Elfring <[email protected]>
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.