net: Fix wrong sizeof

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>
This commit is contained in:
Jean Delvare 2009-10-02 09:55:19 -07:00 committed by David S. Miller
parent 42324c6270
commit b607bd9000
2 changed files with 2 additions and 2 deletions

View file

@ -381,7 +381,7 @@ int main(int argc, char **argv)
memset(&hwtstamp, 0, sizeof(hwtstamp)); memset(&hwtstamp, 0, sizeof(hwtstamp));
strncpy(hwtstamp.ifr_name, interface, sizeof(hwtstamp.ifr_name)); strncpy(hwtstamp.ifr_name, interface, sizeof(hwtstamp.ifr_name));
hwtstamp.ifr_data = (void *)&hwconfig; hwtstamp.ifr_data = (void *)&hwconfig;
memset(&hwconfig, 0, sizeof(&hwconfig)); memset(&hwconfig, 0, sizeof(hwconfig));
hwconfig.tx_type = hwconfig.tx_type =
(so_timestamping_flags & SOF_TIMESTAMPING_TX_HARDWARE) ? (so_timestamping_flags & SOF_TIMESTAMPING_TX_HARDWARE) ?
HWTSTAMP_TX_ON : HWTSTAMP_TX_OFF; HWTSTAMP_TX_ON : HWTSTAMP_TX_OFF;

View file

@ -495,7 +495,7 @@ static void veth_take_cap_ack(struct veth_lpar_connection *cnx,
cnx->remote_lp); cnx->remote_lp);
} else { } else {
memcpy(&cnx->cap_ack_event, event, memcpy(&cnx->cap_ack_event, event,
sizeof(&cnx->cap_ack_event)); sizeof(cnx->cap_ack_event));
cnx->state |= VETH_STATE_GOTCAPACK; cnx->state |= VETH_STATE_GOTCAPACK;
veth_kick_statemachine(cnx); veth_kick_statemachine(cnx);
} }