projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dedupe: print threads used up front
[fio.git]
/
crc
/
crc16.c
diff --git
a/crc/crc16.c
b/crc/crc16.c
index ac7983a24151184169f9a1977794a4e41b7cc831..f593f710dfc12d7fa59a1e167e56ea193e1c0b58 100644
(file)
--- a/
crc/crc16.c
+++ b/
crc/crc16.c
@@
-43,11
+43,12
@@
unsigned short const crc16_table[256] = {
0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040
};
0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040
};
-unsigned short
crc16(unsigned char const
*buffer, unsigned int len)
+unsigned short
fio_crc16(const void
*buffer, unsigned int len)
{
{
+ const unsigned char *cp = (const unsigned char *) buffer;
unsigned short crc = 0;
while (len--)
unsigned short crc = 0;
while (len--)
- crc = crc16_byte(crc, *
buffer
++);
+ crc = crc16_byte(crc, *
cp
++);
return crc;
}
return crc;
}