From: Paul Brossier Date: Mon, 18 Mar 2013 15:46:42 +0000 (-0500) Subject: src/fvec.c: fvec_copy: only get min if needed X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=396103a699e2b71d501e282457c2e52faf3d9e95;p=aubio.git src/fvec.c: fvec_copy: only get min if needed --- diff --git a/src/fvec.c b/src/fvec.c index 345a7f87..ea33b581 100644 --- a/src/fvec.c +++ b/src/fvec.c @@ -87,13 +87,13 @@ void fvec_weight(fvec_t *s, fvec_t *weight) { void fvec_copy(fvec_t *s, fvec_t *t) { uint_t j; - uint_t length = MIN(s->length, t->length); + uint_t length = t->length; if (s->length != t->length) { - AUBIO_WRN("trying to copy %d elements to %d elements \n", - s->length, t->length); + AUBIO_WRN("trying to copy %d elements to %d elements \n", + s->length, t->length); + length = MIN(s->length, t->length); } for (j=0; j< length; j++) { t->data[j] = s->data[j]; } } -