changeset 68:f3cf989e2a99 libavutil

cleanup suggested by Michael Niedermayer
author mru
date Thu, 13 Jul 2006 21:41:28 +0000
parents 0dbb7828d014
children da928d224953
files adler32.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/adler32.c	Thu Jul 13 21:29:01 2006 +0000
+++ b/adler32.c	Thu Jul 13 21:41:28 2006 +0000
@@ -25,15 +25,17 @@
     if (buf == NULL) return 1L;
 
     while (len > 0) {
-        k = len < NMAX ? len : NMAX;
+        k = FFMIN(len, NMAX);
         len -= k;
+#ifndef CONFIG_SMALL
         while (k >= 16) {
             DO16(buf);
             k -= 16;
         }
-        if (k != 0) do {
+#endif
+        while(k--) {
             DO1(buf);
-        } while (--k);
+        }
         s1 %= BASE;
         s2 %= BASE;
     }