# HG changeset patch # User vitor # Date 1215340221 0 # Node ID 297b5219cd3146c0070b390a0f64fe81ea06915c # Parent 655f242bb52514c7a034891bb957bb80b2ea7d83 Do not reimplement memmove() diff -r 655f242bb525 -r 297b5219cd31 ra288.c --- a/ra288.c Sun Jul 06 10:01:54 2008 +0000 +++ b/ra288.c Sun Jul 06 10:30:21 2008 +0000 @@ -54,8 +54,7 @@ double sum, sumsum; float buffer[5]; - for (x=35; x >= 0; x--) - glob->sb[x+5] = glob->sb[x]; + memmove(glob->sb + 5, glob->sb, 36 * sizeof(*glob->sb)); for (x=4; x >= 0; x--) glob->sb[x] = -scalar_product_float(glob->sb + x + 1, glob->pr1, 36); @@ -81,8 +80,7 @@ sum = 1; /* shift and store */ - for (x=10; x > 0; x--) - glob->lhist[x] = glob->lhist[x-1]; + memmove(glob->lhist, glob->lhist - 1, 10 * sizeof(*glob->lhist)); *glob->lhist = glob->history[glob->phase] = 10 * log10(sum) - 32;