Skip to content
Snippets Groups Projects
Commit d2a6b3ef authored by rswindell's avatar rswindell
Browse files

Backed-out some unnecessary ulong -> uint32_t conversions.

parent 8f2564bc
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2007 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -76,7 +76,7 @@ uint16_t crc16tbl[] = {
uint16_t crc16(char* data, unsigned long len)
{
uint16_t crc = 0;
uint32_t l;
unsigned long l;
if(len==0 && data!=NULL)
len=strlen(data);
......
/* crc32.c */
/* 32-bit CRC table */
/* IEEE 802.3 32-bit CRC table and convenience functions */
/* $Id$ */
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2007 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -80,7 +80,7 @@ int32_t crc32tbl[]={ /* CRC polynomial 0xedb88320 */
/****************************************************************************/
uint32_t crc32i(uint32_t crc, char *buf, unsigned long len)
{
uint32_t l;
unsigned long l;
if(len==0 && buf!=NULL)
len=strlen(buf);
......@@ -92,7 +92,8 @@ uint32_t crc32i(uint32_t crc, char *buf, unsigned long len)
uint32_t fcrc32(FILE* fp, unsigned long len)
{
int ch;
uint32_t l,crc=0xffffffff;
uint32_t crc=0xffffffff;
unsigned long l;
rewind(fp);
for(l=0;(len==0 || l<len) && !feof(fp);l++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment