From 8d1fe5eaa3b796609a8e2b7dad2480e623c19819 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Tue, 9 Mar 2010 22:14:58 +0100 Subject: [PATCH] Staging: otus: drop redundant memset 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/) // @@ expression e1,e2,e3,e4; @@ - memset(e1,e2,e3); memcpy(e1,e4,e3); // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/wwrap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/otus/wwrap.c b/drivers/staging/otus/wwrap.c index a74f7eea56e4..b02eb42cd796 100644 --- a/drivers/staging/otus/wwrap.c +++ b/drivers/staging/otus/wwrap.c @@ -956,7 +956,6 @@ int zfLnxCencSendMsg(struct sock *netlink_sk, u_int8_t *msg, int len) /*ÌîдÊý¾Ý±¨Ïà¹ØÐÅÏ¢*/ nlh = NLMSG_PUT(skb, 0, 0, WAI_K_MSG, size-sizeof(*nlh)); pos = NLMSG_DATA(nlh); - memset(pos, 0, len); /*´«Êäµ½Óû§¿Õ¼äµÄÊý¾Ý*/ memcpy(pos, msg, len); -- 2.20.1