diff options
author | Joe Perches <joe@perches.com> | 2011-05-09 15:51:57 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-10 15:54:51 -0400 |
commit | 73f743670d36ddd61247d709711227b0e2e1a497 (patch) | |
tree | 5d68ff675ea5c7c8d1e721b368997b06a6917278 | |
parent | 8c12c7b0efce09b87e67d05332bdcb86ea83f65a (diff) |
rtlwifi: rtl8192cu: Fix memset/memcpy using sizeof(ptr) not sizeof(*ptr)
Found via coccinelle script
@@
type T;
T* ptr;
expression E1;
@@
* memset(E1, 0, sizeof(ptr));
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c index 79c98f62175f..3a92ba3c4a1e 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | |||
@@ -372,7 +372,7 @@ static void _rtl_rx_process(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
372 | __le16 fc; | 372 | __le16 fc; |
373 | struct ieee80211_hdr *hdr; | 373 | struct ieee80211_hdr *hdr; |
374 | 374 | ||
375 | memset(rx_status, 0, sizeof(rx_status)); | 375 | memset(rx_status, 0, sizeof(*rx_status)); |
376 | rxdesc = skb->data; | 376 | rxdesc = skb->data; |
377 | skb_len = skb->len; | 377 | skb_len = skb->len; |
378 | drvinfo_len = (GET_RX_DESC_DRVINFO_SIZE(rxdesc) * RTL_RX_DRV_INFO_UNIT); | 378 | drvinfo_len = (GET_RX_DESC_DRVINFO_SIZE(rxdesc) * RTL_RX_DRV_INFO_UNIT); |
@@ -434,7 +434,7 @@ static void _rtl_rx_process(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
434 | "0x%02X\n", fc, (u32)hdr->addr1[0], (u32)hdr->addr1[1], | 434 | "0x%02X\n", fc, (u32)hdr->addr1[0], (u32)hdr->addr1[1], |
435 | (u32)hdr->addr1[2], (u32)hdr->addr1[3], (u32)hdr->addr1[4], | 435 | (u32)hdr->addr1[2], (u32)hdr->addr1[3], (u32)hdr->addr1[4], |
436 | (u32)hdr->addr1[5])); | 436 | (u32)hdr->addr1[5])); |
437 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); | 437 | memcpy(IEEE80211_SKB_RXCB(skb), rx_status, sizeof(*rx_status)); |
438 | ieee80211_rx_irqsafe(hw, skb); | 438 | ieee80211_rx_irqsafe(hw, skb); |
439 | } | 439 | } |
440 | 440 | ||