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: <4CC6C1C0.8020005@bfs.de>
Date:	Tue, 26 Oct 2010 13:55:44 +0200
From:	walter harms <wharms@....de>
To:	Julia Lawall <julia@...u.dk>
CC:	Karsten Keil <isdn@...ux-pingi.de>,
	kernel-janitors@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/14] drivers/isdn: delete double assignment



Julia Lawall schrieb:
> From: Julia Lawall <julia@...u.dk>
> 
> Delete successive assignments to the same location.  In the first case, the
> hscx array has two elements, so change the assignment to initialize the
> second one.  In the second case, the two assignments are simply identical.
> 
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> expression i;
> @@
> 
> *i = ...;
>  i = ...;
> // </smpl>
> 
> Signed-off-by: Julia Lawall <julia@...u.dk>
> 
> ---
> In the first case, the patch changes the semantics and has not been tested.
> 
>  drivers/isdn/hardware/mISDN/mISDNinfineon.c |    2 +-
>  drivers/isdn/hisax/l3_1tr6.c                |    2 --
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
> index af25e1f..e90db88 100644
> --- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c
> +++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
> @@ -563,7 +563,7 @@ reset_inf(struct inf_hw *hw)
>  		mdelay(10);
>  		hw->ipac.isac.adf2 = 0x87;
>  		hw->ipac.hscx[0].slot = 0x1f;
> -		hw->ipac.hscx[0].slot = 0x23;
> +		hw->ipac.hscx[1].slot = 0x23;
>  		break;
>  	case INF_GAZEL_R753:
>  		val = inl((u32)hw->cfg.start + GAZEL_CNTRL);
> diff --git a/drivers/isdn/hisax/l3_1tr6.c b/drivers/isdn/hisax/l3_1tr6.c
> index b0554f8..a5c76fc 100644
> --- a/drivers/isdn/hisax/l3_1tr6.c
> +++ b/drivers/isdn/hisax/l3_1tr6.c
> @@ -164,8 +164,6 @@ l3_1tr6_setup(struct l3_process *pc, u_char pr, void *arg)
>  	char tmp[80];
>  	struct sk_buff *skb = arg;
>  
> -	p = skb->data;
> -
>  	/* Channel Identification */
>  	p = skb->data;
>  	if ((p = findie(p, skb->len, WE0_chanID, 0))) {
> 


perhaps you can move the next assignment out of if also ?

p = findie(skb->data, skb->len, WE0_chanID, 0);
if (p) { ....


re,
 wh

> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ