net: ipv6: Fix the constness of function parameters

Some of the IPv6 utility functions were missing const in
one of the parameters that are not modified by the corresponding
function.

Change-Id: Ic9fe53daac288570c14423fd9410dcf15d1c5cfa
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2017-04-12 10:34:59 +03:00
commit 528a393470
3 changed files with 5 additions and 4 deletions

View file

@ -603,7 +603,7 @@ void net_if_ipv6_addr_update_lifetime(struct net_if_addr *ifaddr,
*
* @return True if successfully removed, false otherwise
*/
bool net_if_ipv6_addr_rm(struct net_if *iface, struct in6_addr *addr);
bool net_if_ipv6_addr_rm(struct net_if *iface, const struct in6_addr *addr);
/**

View file

@ -601,8 +601,9 @@ static inline bool net_is_ipv6_addr_mcast_global(const struct in6_addr *addr)
* @param src IPv6 address.
* @param dst IPv6 address.
*/
static inline void net_ipv6_addr_create_solicited_node(struct in6_addr *src,
struct in6_addr *dst)
static inline
void net_ipv6_addr_create_solicited_node(const struct in6_addr *src,
struct in6_addr *dst)
{
dst->s6_addr[0] = 0xFF;
dst->s6_addr[1] = 0x02;

View file

@ -617,7 +617,7 @@ struct net_if_addr *net_if_ipv6_addr_add(struct net_if *iface,
return NULL;
}
bool net_if_ipv6_addr_rm(struct net_if *iface, struct in6_addr *addr)
bool net_if_ipv6_addr_rm(struct net_if *iface, const struct in6_addr *addr)
{
int i;