* crc.c (crc32_update): Actually use crc parameter, suggested by
authorSimon Josefsson <simon@josefsson.org>
Fri, 21 Oct 2005 12:39:10 +0000 (12:39 +0000)
committerSimon Josefsson <simon@josefsson.org>
Fri, 21 Oct 2005 12:39:10 +0000 (12:39 +0000)
Bruno Haible <bruno@clisp.org>.

lib/ChangeLog
lib/crc.c

index a8fa0dc..ae05d1b 100644 (file)
@@ -1,5 +1,8 @@
 2005-10-21  Simon Josefsson  <jas@extundo.com>
 
+       * crc.c (crc32_update): Actually use crc parameter, suggested by
+       Bruno Haible <bruno@clisp.org>.
+
        * crc.h: Include stdint.h directly, suggested by Bruno Haible
        <bruno@clisp.org>.
 
index e3132fb..a1ffbb7 100644 (file)
--- a/lib/crc.c
+++ b/lib/crc.c
@@ -97,7 +97,7 @@ crc32_no_xor (const char *buf, size_t len)
 uint32_t
 crc32_update (uint32_t crc, const char *buf, size_t len)
 {
-  return crc32_update_no_xor (0L ^ 0xffffffffL, buf, len) ^ 0xffffffffL;
+  return crc32_update_no_xor (crc ^ 0xffffffffL, buf, len) ^ 0xffffffffL;
 }
 
 uint32_t