changeset 6407:01bbdf942804

* crc.c (crc32_update): Actually use crc parameter, suggested by Bruno Haible <bruno@clisp.org>.
author Simon Josefsson <simon@josefsson.org>
date Fri, 21 Oct 2005 12:39:10 +0000
parents edea0771ea6b
children c7b869ce2879
files lib/ChangeLog lib/crc.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -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>.
 
--- a/lib/crc.c
+++ b/lib/crc.c
@@ -97,7 +97,7 @@
 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