unsigned int -> uint32_t
This commit is contained in:
parent
560cdc2330
commit
c8cc188b71
2 changed files with 8 additions and 5 deletions
|
@ -7,7 +7,7 @@
|
|||
// unsigned long crc = -1L
|
||||
// crc = crc32(buffer, length, crc)
|
||||
|
||||
unsigned int stasis_crc32(const void *buffer, unsigned int count, unsigned int crc);
|
||||
uint32_t stasis_crc32(const void *buffer, unsigned int count, uint32_t crc);
|
||||
static int BuildCRCTable(void);
|
||||
|
||||
static unsigned int CRCTable[256]; // Table constructed for fast lookup.
|
||||
|
@ -34,9 +34,9 @@ static int BuildCRCTable(void)
|
|||
return 0;
|
||||
}
|
||||
/* changed long to int, void to const void - rusty. */
|
||||
unsigned int stasis_crc32(const void *buffer, unsigned int count, unsigned int crc)
|
||||
uint32_t stasis_crc32(const void *buffer, unsigned int count, uint32_t crc)
|
||||
{
|
||||
unsigned int temp1, temp2;
|
||||
uint32_t temp1, temp2;
|
||||
static int firsttime = 1;
|
||||
unsigned char *p = (unsigned char *)buffer;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef STASIS_CRC32_H
|
||||
#define STASIS_CRC32_H
|
||||
/* This CRC code was taken from: http://www.axlradius.com/freestuff/crc2.c
|
||||
|
||||
(It is presumably in the public domain. Other files under /freestuff/ are...)
|
||||
|
@ -13,5 +15,6 @@
|
|||
unsigned int crc = -1L
|
||||
crc = crc32(buffer, length, crc)
|
||||
*/
|
||||
|
||||
unsigned int stasis_crc32(const void *buffer, unsigned int count, unsigned int crc);
|
||||
#include <stasis/common.h>
|
||||
uint32_t stasis_crc32(const void *buffer, unsigned int count, uint32_t crc);
|
||||
#endif // STASIS_CRC32_H
|
||||
|
|
Loading…
Reference in a new issue