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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 28 Jul 2014 20:58:12 +0530
From:	Himangi Saraogi <himangi774@...il.com>
To:	Samuel Ortiz <samuel@...tiz.org>,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc:	julia.lawall@...6.fr
Subject: [PATCH] net: irda: delete double assignment

Delete successive assignments to the same location.

A simplified version of Coccinelle semantic match that finds this problem is as
follows:

// <smpl>
@@
expression i;
@@

*i = ...;
 i = ...;
// </smpl>

Signed-off-by: Himangi Saraogi <himangi774@...il.com>
---
Should the second assignment have been |=?
 net/irda/irlap_frame.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c
index 9ea0c93..4c169f6 100644
--- a/net/irda/irlap_frame.c
+++ b/net/irda/irlap_frame.c
@@ -621,7 +621,6 @@ void irlap_send_rd_frame(struct irlap_cb *self)
 
 	frame = (struct rd_frame *)skb_put(tx_skb, 2);
 
-	frame->caddr = self->caddr;
 	frame->caddr = RD_RSP | PF_BIT;
 
 	irlap_queue_xmit(self, tx_skb);
-- 
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