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:
parent
14877fd6a6
commit
ae55dae454
10 changed files with 15 additions and 15 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue