diff options
Diffstat (limited to 'plugins/FileAsMessage/src/crc32.cpp')
-rw-r--r-- | plugins/FileAsMessage/src/crc32.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/FileAsMessage/src/crc32.cpp b/plugins/FileAsMessage/src/crc32.cpp index ab34393f8d..dc40c1a6fb 100644 --- a/plugins/FileAsMessage/src/crc32.cpp +++ b/plugins/FileAsMessage/src/crc32.cpp @@ -9,9 +9,9 @@ void InitCRC32() {
UINT32 r = i;
for (int j = 0; j < 8; j++)
- if (r & 1)
+ if (r & 1)
r = (r >> 1) ^ CRCPoly;
- else
+ else
r >>= 1;
CRC32Table[i] = r;
}
@@ -21,11 +21,11 @@ const ulong INITCRC = -1L; inline ulong UpdateCRC32(uchar val, ulong crc)
{
- return CRC32Table[(uchar)crc^val] ^ (crc>>8);
+ return CRC32Table[(uchar)crc^val] ^ (crc >> 8);
}
-ulong memcrc32(uchar *ptr, int size, ulong crc )
+ulong memcrc32(uchar *ptr, int size, ulong crc)
{
- while(size--) crc = UpdateCRC32(*ptr++, crc);
+ while (size--) crc = UpdateCRC32(*ptr++, crc);
return crc;
}
|