diff options
author | Julia Lawall <julia@diku.dk> | 2010-03-09 22:15:21 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 11:35:34 -0700 |
commit | 8f18604e6f0975fa852f43f90d5556efd67efadc (patch) | |
tree | f36ae2b6163467d3448e298c8edd2435fd4a69bd /drivers/staging/rt2860 | |
parent | 347fd7dbdb6ca771f59996ae3c75a2dfde66c3d7 (diff) | |
download | talos-op-linux-8f18604e6f0975fa852f43f90d5556efd67efadc.tar.gz talos-op-linux-8f18604e6f0975fa852f43f90d5556efd67efadc.zip |
Staging: 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/rt2860')
-rw-r--r-- | drivers/staging/rt2860/sta/assoc.c | 1 | ||||
-rw-r--r-- | drivers/staging/rt2860/sta_ioctl.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/drivers/staging/rt2860/sta/assoc.c b/drivers/staging/rt2860/sta/assoc.c index 7055f229e511..6e85d5e6554b 100644 --- a/drivers/staging/rt2860/sta/assoc.c +++ b/drivers/staging/rt2860/sta/assoc.c @@ -1596,7 +1596,6 @@ BOOLEAN StaAddMacTableEntry(struct rt_rtmp_adapter *pAd, union iwreq_data wrqu; wext_notify_event_assoc(pAd); - memset(wrqu.ap_addr.sa_data, 0, MAC_ADDR_LEN); memcpy(wrqu.ap_addr.sa_data, pAd->MlmeAux.Bssid, MAC_ADDR_LEN); wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL); diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c index 33a6939cf2ae..112da7a6c417 100644 --- a/drivers/staging/rt2860/sta_ioctl.c +++ b/drivers/staging/rt2860/sta_ioctl.c @@ -608,7 +608,6 @@ int rt_ioctl_siwap(struct net_device *dev, /* Prevent to connect AP again in STAMlmePeriodicExec */ pAdapter->MlmeAux.AutoReconnectSsidLen = 32; - memset(Bssid, 0, MAC_ADDR_LEN); memcpy(Bssid, ap_addr->sa_data, MAC_ADDR_LEN); MlmeEnqueue(pAdapter, MLME_CNTL_STATE_MACHINE, |