staging: r8188eu: fix coccinelle warnings
authorFengguang Wu <fengguang.wu@intel.com>
Sun, 16 Mar 2014 20:32:22 +0000 (15:32 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Mar 2014 21:50:46 +0000 (14:50 -0700)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:8030:3-9: Replace memcpy with struct assignment

Generated by: coccinelle/misc/memcpy-assign.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c

index 21f2f87071761a2a556d46c5f1ff0923c18002ce..3ed5941bedc3c6746c6eca5f442991ccd462b5a8 100644 (file)
@@ -8030,7 +8030,7 @@ static int rtw_scan_ch_decision(struct adapter *padapter, struct rtw_ieee80211_c
                set_idx = rtw_ch_set_search_ch(pmlmeext->channel_set, in[i].hw_value);
                if (in[i].hw_value && !(in[i].flags & RTW_IEEE80211_CHAN_DISABLED) &&
                    set_idx >= 0) {
-                       memcpy(&out[j], &in[i], sizeof(struct rtw_ieee80211_channel));
+                       out[j] = in[i];
 
                        if (pmlmeext->channel_set[set_idx].ScanType == SCAN_PASSIVE)
                                out[j].flags &= RTW_IEEE80211_CHAN_PASSIVE_SCAN;