From 8132afb3de934608af9e4ca3a6249ef9b4d32d97 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 21 Jan 2015 12:42:22 -0600 Subject: [PATCH] Fix some errors in memcpy arguments. No ampersands on array arguments. --- include/nuttx/net/ip.h | 2 +- net/icmpv6/icmpv6_input.c | 2 +- net/icmpv6/icmpv6_solicit.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/nuttx/net/ip.h b/include/nuttx/net/ip.h index a5d3df5494..6dd3379f52 100644 --- a/include/nuttx/net/ip.h +++ b/include/nuttx/net/ip.h @@ -272,7 +272,7 @@ struct ipv6_hdr_s #ifdef CONFIG_NET_IPv6 # define net_ipv6addr_copy(dest,src) \ - memcpy(&dest, &src, sizeof(net_ipv6addr_t)) + memcpy(dest, src, sizeof(net_ipv6addr_t)) # define net_ipv6addr_hdrcopy(dest,src) \ net_ipv6addr_copy(dest, src) #endif diff --git a/net/icmpv6/icmpv6_input.c b/net/icmpv6/icmpv6_input.c index bc0cd7c28f..002830b588 100644 --- a/net/icmpv6/icmpv6_input.c +++ b/net/icmpv6/icmpv6_input.c @@ -202,7 +202,7 @@ void icmpv6_input(FAR struct net_driver_s *dev) * REVISIT: What if the link layer is not Ethernet? */ - memcpy(&(adv->tgtlladdr), &dev->d_mac, IFHWADDRLEN); + memcpy(adv->tgtlladdr, &dev->d_mac, IFHWADDRLEN); /* Calculate the checksum over both the ICMP header and payload */ diff --git a/net/icmpv6/icmpv6_solicit.c b/net/icmpv6/icmpv6_solicit.c index 1edabeec6b..0bafd67ccd 100644 --- a/net/icmpv6/icmpv6_solicit.c +++ b/net/icmpv6/icmpv6_solicit.c @@ -146,7 +146,7 @@ void icmpv6_solicit(FAR struct net_driver_s *dev, * REVISIT: What if the link layer is not Ethernet? */ - memcpy(&(sol->srclladdr), &dev->d_mac, IFHWADDRLEN); + memcpy(sol->srclladdr, &dev->d_mac, IFHWADDRLEN); /* Calculate the checksum over both the ICMP header and payload */