diff mbox

[OPW,kernel,5/6] staging: rtl8187se: replace memcpy with struct assignment

Message ID 1382645851-928-6-git-send-email-teobaluta@gmail.com
State New, archived
Headers show

Commit Message

Teodora Baluta Oct. 24, 2013, 8:17 p.m. UTC
This patch fixes the following issue found with coccinelle:

drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c:1437:2-8: Replace memcpy with struct assignment

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rusty Russell Oct. 25, 2013, 1 a.m. UTC | #1
Teodora Baluta <teobaluta@gmail.com> writes:
> This patch fixes the following issue found with coccinelle:
>
> drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c:1437:2-8: Replace memcpy with struct assignment
>
> Signed-off-by: Teodora Baluta <teobaluta@gmail.com>

Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>

Cheers,
Rusty.

> ---
>  drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
> index 3045790..dbfcec7 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
> @@ -1434,7 +1434,7 @@ inline void ieee80211_process_probe_response(
>  				     "PROBE RESPONSE" : "BEACON");
>  #endif
>  
> -		memcpy(target, &network, sizeof(*target));
> +		*target = network;
>  		list_add_tail(&target->list, &ieee->network_list);
>  	} else {
>  		IEEE80211_DEBUG_SCAN("Updating '%s' (%pM) via %s.\n",
> -- 
> 1.7.10.4
>
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
diff mbox

Patch

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
index 3045790..dbfcec7 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
@@ -1434,7 +1434,7 @@  inline void ieee80211_process_probe_response(
 				     "PROBE RESPONSE" : "BEACON");
 #endif
 
-		memcpy(target, &network, sizeof(*target));
+		*target = network;
 		list_add_tail(&target->list, &ieee->network_list);
 	} else {
 		IEEE80211_DEBUG_SCAN("Updating '%s' (%pM) via %s.\n",