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>] [day] [month] [year] [list]
Date:   Sat, 13 Jan 2018 16:46:28 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     ocfs2-devel@....oracle.com, Joel Becker <jlbec@...lplan.org>,
        Mark Fasheh <mfasheh@...sity.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH] ocfs2: Combine two seq_printf() calls into one call in
 ocfs2_dlm_seq_show()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 13 Jan 2018 16:36:51 +0100

Some data were printed into a sequence by two separate function calls.
Print almost the same data by a single function call instead.
(Omit a tab character at the line end within a format string.)

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 fs/ocfs2/dlmglue.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index e4b9085a657a..909b4a339c80 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -3104,7 +3104,7 @@ static int ocfs2_dlm_seq_show(struct seq_file *m, void *v)
 		   "%llu\t"
 		   "%u\t"
 		   "%u\t"
-		   "%u\t",
+		   "%u\n",
 		   lock_num_prmode(lockres),
 		   lock_num_exmode(lockres),
 		   lock_num_prmode_failed(lockres),
@@ -3114,9 +3114,6 @@ static int ocfs2_dlm_seq_show(struct seq_file *m, void *v)
 		   lock_max_prmode(lockres),
 		   lock_max_exmode(lockres),
 		   lock_refresh(lockres));
-
-	/* End the line */
-	seq_printf(m, "\n");
 	return 0;
 }
 
-- 
2.15.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ