/* This is the standard Gary S. Brown's 32 bit CRC algorithm, but
accumulate the CRC into the result of a previous CRC. */
cyg_uint32
-cyg_crc32_accumulate(cyg_uint32 crc32val, unsigned char *s, int len)
+cyg_crc32_accumulate(cyg_uint32 crc32val, void *ptr, int len)
{
+ unsigned char *s = ptr;
int i;
for (i = 0; i < len; i++) {
/* This is the standard Gary S. Brown's 32 bit CRC algorithm */
cyg_uint32
-cyg_crc32(unsigned char *s, int len)
+cyg_crc32(void *s, int len)
{
return (cyg_crc32_accumulate(0,s,len));
}
result from a previous CRC calculation. This uses the Ethernet FCS
algorithm.*/
cyg_uint32
-cyg_ether_crc32_accumulate(cyg_uint32 crc32val, unsigned char *s, int len)
+cyg_ether_crc32_accumulate(cyg_uint32 crc32val, void *ptr, int len)
{
+ unsigned char *s = ptr;
int i;
if (s == 0) return 0L;
/* Return a 32-bit CRC of the contents of the buffer, using the
Ethernet FCS algorithm. */
cyg_uint32
-cyg_ether_crc32(unsigned char *s, int len)
+cyg_ether_crc32(void *s, int len)
{
return cyg_ether_crc32_accumulate(0,s,len);
}