1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-23 07:27:05 +00:00

Fix wrong order of arguments in calloc

This commit is contained in:
Carles Fernandez 2024-04-22 09:48:28 +02:00
parent c6010d943e
commit c91c31bd35
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -1034,7 +1034,7 @@ double *zeros(int n, int m)
{ {
return nullptr; return nullptr;
} }
if (!(p = static_cast<double *>(calloc(sizeof(double), n * m)))) if (!(p = static_cast<double *>(calloc(n * m, sizeof(double)))))
{ {
fatalerr("matrix memory allocation error: n=%d,m=%d\n", n, m); fatalerr("matrix memory allocation error: n=%d,m=%d\n", n, m);
} }