1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-15 17:43:51 +01:00

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.
This commit is contained in:
Marian Buschsieweke 2024-06-04 15:43:53 +02:00
parent 86e0ca351a
commit ff3f055dc7
No known key found for this signature in database
GPG Key ID: 77AA882EC78084E6

View File

@ -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);