From d2e5cf3a6dba59c7ddcb2928d99040b8507621b4 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Fri, 5 Feb 2021 16:39:41 +0000 Subject: [PATCH] Fix incorrect initialisation --- src/speex/resample.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/speex/resample.c b/src/speex/resample.c index 2b60cef..b2e302e 100644 --- a/src/speex/resample.c +++ b/src/speex/resample.c @@ -90,10 +90,7 @@ static void *speex_alloc (int count, int size) #ifdef HAVE_IPP void *rv; #endif - -// fprintf(stderr, "speex_alloc(%d,%d)\n", count, size); - if (count * size < ALLOC_MINIMUM) { -// fprintf(stderr, "upgrading count from %d to %d\n", count, ALLOC_MINIMUM / size); + if (count * size < ALLOC_MINIMUM) { count = ALLOC_MINIMUM / size; } @@ -105,9 +102,7 @@ static void *speex_alloc (int count, int size) } else { rv = ippsMalloc_8u(count * size); } -// fprintf(stderr, "allocated at %p; now setting %d bytes to zero\n", rv, count*size); - memset(rv, count * size, 0); -// fprintf(stderr, "returning %p\n",rv); + memset(rv, 0, count * size); return rv; #else return calloc(count, size);