bugfix: calloc arguments' wrong order

This commit is contained in:
Cedric Roux
2016-05-10 10:01:45 +02:00
parent 497c64a964
commit b04a448b62
3 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -39,9 +39,9 @@ static void _event(void *p, event e)
l->blength = nsamples * 10;
free(l->x);
free(l->buffer);
l->x = calloc(sizeof(float), l->blength);
l->x = calloc(l->blength, sizeof(float));
if (l->x == NULL) abort();
l->buffer = calloc(sizeof(float), l->blength);
l->buffer = calloc(l->blength, sizeof(float));
if (l->buffer == NULL) abort();
/* update 'x' */
for (i = 0; i < l->blength; i++)