carl9170 firmware: correct use of memset
authorIgnacy Gawedzki <i@lri.fr>
Thu, 14 Jul 2011 13:03:11 +0000 (15:03 +0200)
committerChristian Lamparter <chunkeey@googlemail.com>
Thu, 14 Jul 2011 13:03:11 +0000 (15:03 +0200)
I noticed something that may be a bug in wlan.c, in
wlan_wol_connection_monitor():

memset(nullf, 0, sizeof(nullf));

Should be:

memset(nullf, 0, sizeof(*nullf));

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
carlfw/src/wlan.c

index 7567312251f8896f71dac95bfd7947a046273dab..59e9141feeccdb9d107a8bde210cc1b968a87710 100644 (file)
@@ -756,7 +756,7 @@ static void wlan_wol_connection_monitor(void)
        if (!fw.wlan.fw_desc_available)
                return;
 
-       memset(nullf, 0, sizeof(nullf));
+       memset(nullf, 0, sizeof(*nullf));
 
        nullf->s.len = sizeof(struct carl9170_tx_superdesc) +
                     sizeof(struct ar9170_tx_hwdesc) +