lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3afb88f1-2934-f1be-067b-db43df675bd4@users.sourceforge.net>
Date:   Sat, 13 Jan 2018 15:03:27 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-nfs@...r.kernel.org, Jeff Layton <jlayton@...nel.org>,
        "J. Bruce Fields" <bfields@...ldses.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 1/2] nfsd: Use seq_putc() in four functions

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 13 Jan 2018 14:20:27 +0100

Five single characters should be put into a sequence.
Thus use the corresponding function "seq_putc".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 fs/nfsd/export.c    | 6 +++---
 fs/nfsd/nfs4idmap.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 8ceb25a10ea0..3b035a87e4c4 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -181,10 +181,10 @@ static int expkey_show(struct seq_file *m,
 		seq_printf(m, "%08x", ek->ek_fsid[i]);
 	if (test_bit(CACHE_VALID, &h->flags) && 
 	    !test_bit(CACHE_NEGATIVE, &h->flags)) {
-		seq_printf(m, " ");
+		seq_putc(m, ' ');
 		seq_path(m, &ek->ek_path, "\\ \t\n");
 	}
-	seq_printf(m, "\n");
+	seq_putc(m, '\n');
 	return 0;
 }
 
@@ -1123,7 +1123,7 @@ static void show_expflags(struct seq_file *m, int flags, int mask)
 
 static void show_secinfo_flags(struct seq_file *m, int flags)
 {
-	seq_printf(m, ",");
+	seq_putc(m, ',');
 	show_expflags(m, flags, NFSEXP_SECINFO_FLAGS);
 }
 
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
index a5bb76593ce7..8917b5f09896 100644
--- a/fs/nfsd/nfs4idmap.c
+++ b/fs/nfsd/nfs4idmap.c
@@ -161,7 +161,7 @@ idtoname_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h)
 			ent->id);
 	if (test_bit(CACHE_VALID, &h->flags))
 		seq_printf(m, " %s", ent->name);
-	seq_printf(m, "\n");
+	seq_putc(m, '\n');
 	return 0;
 }
 
@@ -332,7 +332,7 @@ nametoid_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h)
 			ent->name);
 	if (test_bit(CACHE_VALID, &h->flags))
 		seq_printf(m, " %u", ent->id);
-	seq_printf(m, "\n");
+	seq_putc(m, '\n');
 	return 0;
 }
 
-- 
2.15.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ