From ff3f055dc7cffb2a13e6d28d963f3ebff8ddd11f Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Tue, 4 Jun 2024 15:43:53 +0200 Subject: [PATCH] cpu/native: fix compilation with GCC 14.1 The first argument to `calloc()` is the number of members, the second the member size. This fixes an instance where the arguments where switched. --- cpu/native/startup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/native/startup.c b/cpu/native/startup.c index bb3431a7ed..5ee0515ff4 100644 --- a/cpu/native/startup.c +++ b/cpu/native/startup.c @@ -480,7 +480,7 @@ __attribute__((constructor)) static void startup(int argc, char **argv, char **e const size_t argc_max = 32; size_t cmdlen = 0; char *cmdline = malloc(bufsize); - argv = calloc(sizeof(char *), argc_max); + argv = calloc(argc_max, sizeof(char *)); argc = 0; envp = NULL; expect(cmdline != NULL);