Prev: [PATCH] KGDB: add smp_mb() in synchronisation during exception handler exit
Next: USBFS Memory allocation Bug
From: Julia Lawall on 9 Mar 2010 16:20 From: Julia Lawall <julia(a)diku.dk> The region set by the call to memset is immediately overwritten by the subsequent call to memcpy. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e1,e2,e3,e4; @@ - memset(e1,e2,e3); memcpy(e1,e4,e3); // </smpl> Signed-off-by: Julia Lawall <julia(a)diku.dk> --- drivers/staging/otus/wwrap.c | 1 - 1 file changed, 1 deletion(-) diff -u -p a/drivers/staging/otus/wwrap.c b/drivers/staging/otus/wwrap.c --- a/drivers/staging/otus/wwrap.c +++ b/drivers/staging/otus/wwrap.c @@ -955,7 +955,6 @@ int zfLnxCencSendMsg(struct sock *netlin /*��д��ݱ������Ϣ*/ nlh = NLMSG_PUT(skb, 0, 0, WAI_K_MSG, size-sizeof(*nlh)); pos = NLMSG_DATA(nlh); - memset(pos, 0, len); /*���䵽�û��ռ�����*/ memcpy(pos, msg, len); |