net: if: Make IPv4 address const in removal function

As the function does not touch IPv4 address in removal, we
can mark it const.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2019-05-29 13:03:34 +08:00
parent 01fa8a6fe2
commit 10189332cd
2 changed files with 2 additions and 2 deletions

View File

@ -1476,7 +1476,7 @@ struct net_if_addr *net_if_ipv4_addr_add(struct net_if *iface,
*
* @return True if successfully removed, false otherwise
*/
bool net_if_ipv4_addr_rm(struct net_if *iface, struct in_addr *addr);
bool net_if_ipv4_addr_rm(struct net_if *iface, const struct in_addr *addr);
/**
* @brief Check if this IPv4 address belongs to one of the interface indices.

View File

@ -2687,7 +2687,7 @@ struct net_if_addr *net_if_ipv4_addr_add(struct net_if *iface,
return NULL;
}
bool net_if_ipv4_addr_rm(struct net_if *iface, struct in_addr *addr)
bool net_if_ipv4_addr_rm(struct net_if *iface, const struct in_addr *addr)
{
#if defined(CONFIG_NET_IPV4)
struct net_if_ipv4 *ipv4 = iface->config.ip.ipv4;