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

@ -1826,7 +1826,7 @@ static int cmd_per_adv_sync_delete(const struct shell *sh, size_t argc,
}
if (index >= ARRAY_SIZE(per_adv_syncs)) {
shell_error(sh, "Maximum index is %ld but %d was requested",
shell_error(sh, "Maximum index is %zu but %d was requested",
ARRAY_SIZE(per_adv_syncs) - 1, index);
}
@ -1963,7 +1963,7 @@ static int cmd_per_adv_sync_transfer(const struct shell *sh, size_t argc,
}
if (index >= ARRAY_SIZE(per_adv_syncs)) {
shell_error(sh, "Maximum index is %ld but %d was requested",
shell_error(sh, "Maximum index is %zu but %d was requested",
ARRAY_SIZE(per_adv_syncs) - 1, index);
}