diff mbox series

nfsd: Use seq_putc() in seq_quote_mem()

Message ID ab25204c-5a53-42e1-ab3a-c4f704ebc929@web.de (mailing list archive)
State New
Headers show
Series nfsd: Use seq_putc() in seq_quote_mem() | expand

Commit Message

Markus Elfring July 13, 2024, 7:16 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 13 Jul 2024 21:07:09 +0200

Double quotation characters should be put into a sequence
around other data.
Thus use the function “seq_putc” accordingly.

This issue was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 fs/nfsd/nfs4state.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
2.45.2
diff mbox series

Patch

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index a20c2c9d7d45..1d15165a15cf 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2636,9 +2636,9 @@  static struct nfs4_client *get_nfsdfs_clp(struct inode *inode)

 static void seq_quote_mem(struct seq_file *m, char *data, int len)
 {
-	seq_puts(m, "\"");
+	seq_putc(m, '"');
 	seq_escape_mem(m, data, len, ESCAPE_HEX | ESCAPE_NAP | ESCAPE_APPEND, "\"\\");
-	seq_puts(m, "\"");
+	seq_putc(m, '"');
 }

 static const char *cb_state2str(int state)