Description
Summary
net_if_ipv4_addr_add doesn't change its addr param.
net_if_ipv4_set_netmask_by_addr and net_if_ipv4_set_gw have const qualified their addr params.
Const qualifying improves the code because it conveys to readers that the param is a function input.
Const qualifying allows app developers to implement similar quality in their code, e.g. they may pass a const qualified struct pointer of their network config to their function that configures those.
Describe the solution you'd like
Const qualify the addr param, e.g.:
struct net_if_addr *net_if_ipv4_addr_add(struct net_if *iface,
const struct in_addr *addr,
enum net_addr_type addr_type,
uint32_t vlifetime)
Alternatives
No response
Additional Context
No response