diff options
author | Julia Lawall <julia@diku.dk> | 2010-03-09 22:14:58 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 11:35:34 -0700 |
commit | 8d1fe5eaa3b796609a8e2b7dad2480e623c19819 (patch) | |
tree | 28f1d8412b6ed962931e1af545cc023af9db7bf2 /drivers/staging/otus | |
parent | b7e7031aea1215da499b51fea0ade6b92f1232af (diff) |
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/)
// <smpl>
@@
expression e1,e2,e3,e4;
@@
- memset(e1,e2,e3);
memcpy(e1,e4,e3);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/otus')
-rw-r--r-- | drivers/staging/otus/wwrap.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/staging/otus/wwrap.c b/drivers/staging/otus/wwrap.c index a74f7eea56e..b02eb42cd79 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); |