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:
parent
a0ff05efca
commit
b18fddef2e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue