Fix incorrect initialisation
This commit is contained in:
@@ -90,10 +90,7 @@ static void *speex_alloc (int count, int size)
|
|||||||
#ifdef HAVE_IPP
|
#ifdef HAVE_IPP
|
||||||
void *rv;
|
void *rv;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// fprintf(stderr, "speex_alloc(%d,%d)\n", count, size);
|
|
||||||
if (count * size < ALLOC_MINIMUM) {
|
if (count * size < ALLOC_MINIMUM) {
|
||||||
// fprintf(stderr, "upgrading count from %d to %d\n", count, ALLOC_MINIMUM / size);
|
|
||||||
count = ALLOC_MINIMUM / size;
|
count = ALLOC_MINIMUM / size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,9 +102,7 @@ static void *speex_alloc (int count, int size)
|
|||||||
} else {
|
} else {
|
||||||
rv = ippsMalloc_8u(count * size);
|
rv = ippsMalloc_8u(count * size);
|
||||||
}
|
}
|
||||||
// fprintf(stderr, "allocated at %p; now setting %d bytes to zero\n", rv, count*size);
|
memset(rv, 0, count * size);
|
||||||
memset(rv, count * size, 0);
|
|
||||||
// fprintf(stderr, "returning %p\n",rv);
|
|
||||||
return rv;
|
return rv;
|
||||||
#else
|
#else
|
||||||
return calloc(count, size);
|
return calloc(count, size);
|
||||||
|
|||||||
Reference in New Issue
Block a user