diff --git a/cpu/native/startup.c b/cpu/native/startup.c index bb3431a7ed42..5ee0515ff40e 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);