libselinux: reorder calloc(3) arguments

The canonical order of calloc(3) parameters is the number of elements
first and the size of each element second.

Reported by GCC 14:

    is_customizable_type.c:43:45: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
Christian Göttsche 2024-01-05 19:35:32 +01:00 committed by James Carter
parent a0ff05efca
commit b18fddef2e
1 changed files with 1 additions and 3 deletions

View File

@ -39,9 +39,7 @@ static void customizable_init(void)
}
if (ctr) {
list =
(char **) calloc(sizeof(char *),
ctr + 1);
list = calloc(ctr + 1, sizeof(char *));
if (list) {
i = 0;
while (fgets_unlocked(buf, selinux_page_size, fp)