It's number of elements first, size of each element second.

Signed-off-by: Philipp Zabel <p.za...@pengutronix.de>
---
 platsch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/platsch.c b/platsch.c
index 535b589a659a..ea1d37317d0d 100644
--- a/platsch.c
+++ b/platsch.c
@@ -677,7 +677,7 @@ execinit:
                        goto sleep;
                }
 
-               initsargv = calloc(sizeof(argv[0]), argc + 1);
+               initsargv = calloc(argc + 1, sizeof(argv[0]));
                if (!initsargv) {
                        error("failed to allocate argv for init\n");
                        return EXIT_FAILURE;
-- 
2.39.2


Reply via email to