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]
Message-Id: <20140512201833.b8542c4d190b09add29bf148@skynet.be>
Date:	Mon, 12 May 2014 20:18:33 +0200
From:	Fabian Frederick <fabf@...net.be>
To:	linux-kernel <linux-kernel@...r.kernel.org>
Cc:	Andrew Hendry <andrew.hendry@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	akpm <akpm@...ux-foundation.org>
Subject: [PATCH 1/1] net/x25/x25_proc.c: code clean-up

Fixing some checkpatch warnings

Cc: Andrew Hendry <andrew.hendry@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
 net/x25/x25_proc.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/net/x25/x25_proc.c b/net/x25/x25_proc.c
index 0917f04..fa79117 100644
--- a/net/x25/x25_proc.c
+++ b/net/x25/x25_proc.c
@@ -88,23 +88,23 @@ static int x25_seq_socket_show(struct seq_file *seq, void *v)
 	const char *devname;
 
 	if (v == SEQ_START_TOKEN) {
-		seq_printf(seq, "dest_addr  src_addr   dev   lci st vs vr "
-				"va   t  t2 t21 t22 t23 Snd-Q Rcv-Q inode\n");
+		seq_puts(seq, "dest_addr  src_addr   dev   lci st vs vr va   t  t2 t21 t22 t23 Snd-Q Rcv-Q inode\n");
 		goto out;
 	}
 
 	s = sk_entry(v);
 	x25 = x25_sk(s);
+	dev = x25->neighbour->dev;
 
-	if (!x25->neighbour || (dev = x25->neighbour->dev) == NULL)
+	if (!x25->neighbour || !dev)
 		devname = "???";
 	else
 		devname = x25->neighbour->dev->name;
 
-	seq_printf(seq, "%-10s %-10s %-5s %3.3X  %d  %d  %d  %d %3lu %3lu "
-			"%3lu %3lu %3lu %5d %5d %ld\n",
+	seq_printf(seq, "%-10s %-10s %-5s %3.3X  %d  %d  %d  %d %3lu %3lu %3lu %3lu %3lu %5d %5d %ld\n",
 		   !x25->dest_addr.x25_addr[0] ? "*" : x25->dest_addr.x25_addr,
-		   !x25->source_addr.x25_addr[0] ? "*" : x25->source_addr.x25_addr,
+		   !x25->source_addr.x25_addr[0] ? "*" :
+		   x25->source_addr.x25_addr,
 		   devname, x25->lci & 0x0FFF, x25->state, x25->vs, x25->vr,
 		   x25->va, x25_display_timer(s) / HZ, x25->t2  / HZ,
 		   x25->t21 / HZ, x25->t22 / HZ, x25->t23 / HZ,
@@ -138,7 +138,7 @@ static int x25_seq_forward_show(struct seq_file *seq, void *v)
 	struct x25_forward *f = list_entry(v, struct x25_forward, node);
 
 	if (v == &x25_forward_list) {
-		seq_printf(seq, "lci dev1       dev2\n");
+		seq_puts(seq, "lci dev1       dev2\n");
 		goto out;
 	}
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ