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) {
|
if (ctr) {
|
||||||
list =
|
list = calloc(ctr + 1, sizeof(char *));
|
||||||
(char **) calloc(sizeof(char *),
|
|
||||||
ctr + 1);
|
|
||||||
if (list) {
|
if (list) {
|
||||||
i = 0;
|
i = 0;
|
||||||
while (fgets_unlocked(buf, selinux_page_size, fp)
|
while (fgets_unlocked(buf, selinux_page_size, fp)
|
||||||
|
|
Loading…
Reference in New Issue