shithub: aubio

Download patch

ref: 1c24da5336007750b302f3952f398fac939ddbff
parent: 7ce070130d4bf2f98566c7023dc84c7a61893701
author: Paul Brossier <piem@piem.org>
date: Wed Nov 16 12:07:44 EST 2011

src/{f,c}vec.c: remove zeroing since we now use calloc

--- a/src/cvec.c
+++ b/src/cvec.c
@@ -23,14 +23,9 @@
 
 cvec_t * new_cvec( uint_t length) {
   cvec_t * s = AUBIO_NEW(cvec_t);
-  uint_t j;
   s->length = length/2 + 1;
   s->norm = AUBIO_ARRAY(smpl_t,s->length);
   s->phas = AUBIO_ARRAY(smpl_t,s->length);
-  for (j=0; j< s->length; j++) {
-    s->norm[j]=0.;
-    s->phas[j]=0.;
-  }
   return s;
 }
 
--- a/src/fvec.c
+++ b/src/fvec.c
@@ -23,12 +23,8 @@
 
 fvec_t * new_fvec( uint_t length) {
   fvec_t * s = AUBIO_NEW(fvec_t);
-  uint_t j;
   s->length = length;
   s->data = AUBIO_ARRAY(smpl_t, s->length);
-  for (j=0; j< s->length; j++) {
-    s->data[j]=0.;
-  }
   return s;
 }