sys: util: Change return type of ARRAY_SIZE to size_t

The ARRAY_SIZE macro uses sizeof and thus the return
type should be an unsigned value. size_t is typically
the type used for sizeof and fits well for the
ARRAY_SIZE macro as well.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2022-03-22 13:35:44 +01:00 committed by Carles Cufí
commit ae55dae454
10 changed files with 15 additions and 15 deletions

View file

@ -2795,7 +2795,7 @@ static void iface_ipv6_init(int if_count)
k_work_init_delayable(&prefix_lifetime_timer, prefix_lifetime_timeout);
if (if_count > ARRAY_SIZE(ipv6_addresses)) {
NET_WARN("You have %lu IPv6 net_if addresses but %d "
NET_WARN("You have %zu IPv6 net_if addresses but %d "
"network interfaces", ARRAY_SIZE(ipv6_addresses),
if_count);
NET_WARN("Consider increasing CONFIG_NET_IF_MAX_IPV6_COUNT "
@ -3791,7 +3791,7 @@ static void iface_ipv4_init(int if_count)
int i;
if (if_count > ARRAY_SIZE(ipv4_addresses)) {
NET_WARN("You have %lu IPv4 net_if addresses but %d "
NET_WARN("You have %zu IPv4 net_if addresses but %d "
"network interfaces", ARRAY_SIZE(ipv4_addresses),
if_count);
NET_WARN("Consider increasing CONFIG_NET_IF_MAX_IPV4_COUNT "