# HG changeset patch # User vitor # Date 1220897760 0 # Node ID 7640294af313f6b4857d8c47bb746745de73f706 # Parent 0dc972a25a37edcc2af478fa20380a5228a64c53 Simplify if() in copy_and_dup() diff -r 0dc972a25a37 -r 7640294af313 ra144.c --- a/ra144.c Mon Sep 08 18:14:37 2008 +0000 +++ b/ra144.c Mon Sep 08 18:16:00 2008 +0000 @@ -109,12 +109,9 @@ { source += BUFFERSIZE - offset; - if (offset > BLOCKSIZE) { - memcpy(target, source, BLOCKSIZE*sizeof(*target)); - } else { - memcpy(target, source, offset*sizeof(*target)); + memcpy(target, source, FFMIN(BLOCKSIZE, offset)*sizeof(*target)); + if (offset < BLOCKSIZE) memcpy(target + offset, source, (BLOCKSIZE - offset)*sizeof(*target)); - } } /** inverse root mean square */