* 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 a8fa0dcae6411f687fbc0a47d91915949f913af2..ae05d1b5a9104dc40bbe8b010f4d25a303b9bedc 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 e3132fbef8ba363c929279d288d3ec8a62c2092e..a1ffbb77ebcf62495b1c8a39d77581e5fad968a4 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