]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
net: Fix wrong sizeof
authorJean Delvare <khali@linux-fr.org>
Fri, 2 Oct 2009 16:55:19 +0000 (09:55 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 12 Oct 2009 19:40:20 +0000 (12:40 -0700)
commit b607bd900051efc3308c4edc65dd98b34b230021 upstream.

Which is why I have always preferred sizeof(struct foo) over
sizeof(var).

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/networking/timestamping/timestamping.c
drivers/net/iseries_veth.c

index 43d143104210186b5f627b6eba211a180914ebe2..a7936fe8444a1830b5f57eccaf4ca610a42db358 100644 (file)
@@ -381,7 +381,7 @@ int main(int argc, char **argv)
        memset(&hwtstamp, 0, sizeof(hwtstamp));
        strncpy(hwtstamp.ifr_name, interface, sizeof(hwtstamp.ifr_name));
        hwtstamp.ifr_data = (void *)&hwconfig;
-       memset(&hwconfig, 0, sizeof(&hwconfig));
+       memset(&hwconfig, 0, sizeof(hwconfig));
        hwconfig.tx_type =
                (so_timestamping_flags & SOF_TIMESTAMPING_TX_HARDWARE) ?
                HWTSTAMP_TX_ON : HWTSTAMP_TX_OFF;
index e44215cb18823ccaaf959f8ea82a3b442b6e306d..9048718aff1b8c978e0b7a1e40ea089ff0f37078 100644 (file)
@@ -495,7 +495,7 @@ static void veth_take_cap_ack(struct veth_lpar_connection *cnx,
                           cnx->remote_lp);
        } else {
                memcpy(&cnx->cap_ack_event, event,
-                      sizeof(&cnx->cap_ack_event));
+                      sizeof(cnx->cap_ack_event));
                cnx->state |= VETH_STATE_GOTCAPACK;
                veth_kick_statemachine(cnx);
        }