Message ID | 1304919832.19586.15.camel@Joe-Laptop |
---|---|
State | Not Applicable, archived |
Delegated to: | David Miller |
Headers | show |
On 05/09/2011 12:43 AM, Joe Perches wrote: > Found via coccinelle script > > @@ > type T; > T* ptr; > expression E1; > @@ > > * memset(E1, 0, sizeof(ptr)); > > Signed-off-by: Joe Perches<joe@perches.com> > --- > drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c > index 79c98f6..c16fc1c 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) > __le16 fc; > struct ieee80211_hdr *hdr; > > - memset(rx_status, 0, sizeof(rx_status)); > + memset(rx_status, 0, sizeof(*rx_status)); > rxdesc = skb->data; > skb_len = skb->len; > drvinfo_len = (GET_RX_DESC_DRVINFO_SIZE(rxdesc) * RTL_RX_DRV_INFO_UNIT); ACK. Larry -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c index 79c98f6..c16fc1c 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) __le16 fc; struct ieee80211_hdr *hdr; - memset(rx_status, 0, sizeof(rx_status)); + memset(rx_status, 0, sizeof(*rx_status)); rxdesc = skb->data; skb_len = skb->len; drvinfo_len = (GET_RX_DESC_DRVINFO_SIZE(rxdesc) * RTL_RX_DRV_INFO_UNIT);
Found via coccinelle script @@ type T; T* ptr; expression E1; @@ * memset(E1, 0, sizeof(ptr)); Signed-off-by: Joe Perches <joe@perches.com> --- drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html