Skip to content
Permalink
Browse files

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>
  • Loading branch information...
jukkar committed May 29, 2019
1 parent 01fa8a6 commit 10189332cd4a72e9ddad60af140cdceaf6cb5437
Showing with 2 additions and 2 deletions.
  1. +1 −1 include/net/net_if.h
  2. +1 −1 subsys/net/ip/net_if.c
@@ -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;

0 comments on commit 1018933

Please sign in to comment.
You can’t perform that action at this time.