diff options
author | Måns Rullgård <mans@mansr.com> | 2006-07-13 21:41:28 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2006-07-13 21:41:28 +0000 |
commit | 38603ff65d956c6af61021662cfc76d6e54d1d34 (patch) | |
tree | 8097edf4764c842eda4cb26ff737c30a8e457fcd /libavutil/adler32.c | |
parent | b9a73d8d2f1930bf705c836a09f0514480799898 (diff) | |
download | ffmpeg-38603ff65d956c6af61021662cfc76d6e54d1d34.tar.gz |
cleanup suggested by Michael Niedermayer
Originally committed as revision 5732 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/adler32.c')
-rw-r--r-- | libavutil/adler32.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavutil/adler32.c b/libavutil/adler32.c index ab0b86da74..1d814b4561 100644 --- a/libavutil/adler32.c +++ b/libavutil/adler32.c @@ -25,15 +25,17 @@ unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf, unsigne 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; } |