comparison packages/redboot/current/src/crc.c @ 159:511f4dc167f6

Merge from eCos master repository on 2001-05-18-01:30:05-BST
author jlarmour
date Fri, 18 May 2001 06:32:28 +0000
parents b939e9cada46
children e0c0827131d1
comparison
equal deleted inserted replaced
158:f2545e5de153 159:511f4dc167f6
164 unsigned long 164 unsigned long
165 crc32(unsigned char *s, int len) 165 crc32(unsigned char *s, int len)
166 { 166 {
167 int i; 167 int i;
168 unsigned long crc32val; 168 unsigned long crc32val;
169 unsigned long length;
170 169
171 crc32val = 0; 170 crc32val = 0;
172 for (i = 0; i < len; i++) { 171 for (i = 0; i < len; i++) {
173 crc32val = crc32_tab[(crc32val ^ s[i]) & 0xff] ^ (crc32val >> 8); 172 crc32val = crc32_tab[(crc32val ^ s[i]) & 0xff] ^ (crc32val >> 8);
174 } 173 }