Fix calloc() argument order

Catched by a new gcc 14.1.1 warning.
This commit is contained in:
Rodrigo Arias 2024-07-22 16:45:29 +02:00
parent fbb78ae22d
commit 1ab605b70d

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2021-2023 Barcelona Supercomputing Center (BSC) /* Copyright (c) 2021-2024 Barcelona Supercomputing Center (BSC)
* SPDX-License-Identifier: GPL-3.0-or-later */ * SPDX-License-Identifier: GPL-3.0-or-later */
#include <stdint.h> #include <stdint.h>
@ -37,7 +37,7 @@ main(void)
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
double *times = calloc(sizeof(double), NRUNS); double *times = calloc(NRUNS, sizeof(double));
if (times == NULL) { if (times == NULL) {
perror("calloc failed"); perror("calloc failed");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);