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: <856b4c28-d620-38cd-a442-f2fcafd42034@users.sourceforge.net>
Date:   Mon, 1 May 2017 15:32:31 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-sctp@...r.kernel.org, netdev@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        Neil Horman <nhorman@...driver.com>,
        Vlad Yasevich <vyasevich@...il.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 2/3] sctp: Combine two seq_printf() calls into one call in
 sctp_remaddr_seq_show()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 1 May 2017 14:24:34 +0200

A bit of data was put into a sequence by two separate function calls.
Print the same data by a single function call instead.

This issue was detected by using the Coccinelle software.

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

diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index 1cf4b6385418..458087681490 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -475,9 +475,7 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
 		 * The current state of this destination. I.e.
 		 * SCTP_ACTIVE, SCTP_INACTIVE, ...
 		 */
-		seq_printf(seq, "%d", tsp->state);
-
-		seq_printf(seq, "\n");
+		seq_printf(seq, "%d\n", tsp->state);
 	}
 
 	sctp_transport_put(transport);
-- 
2.12.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ