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:
parent
01fa8a6fe2
commit
10189332cd
@ -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.
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user