Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197112
b: refs/heads/master
c: 6dde1c6
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Kenji Toyama authored and Greg Kroah-Hartman committed May 11, 2010
1 parent 1cbad4a commit 45c6564
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b77694be7547d371c2f2e1be077bffcdbfcf7b82
refs/heads/master: 6dde1c6c8e2bcc8e97210d0b6388340a7cbd2afe
21 changes: 11 additions & 10 deletions trunk/drivers/staging/vt6656/tcrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

/*--------------------- Static Variables --------------------------*/

// 32-bit CRC table
/* 32-bit CRC table */
static const DWORD s_adwCrc32Table[256] = {
0x00000000L, 0x77073096L, 0xEE0E612CL, 0x990951BAL,
0x076DC419L, 0x706AF48FL, 0xE963A535L, 0x9E6495A3L,
Expand Down Expand Up @@ -132,17 +132,18 @@ static const DWORD s_adwCrc32Table[256] = {
* Return Value: CRC-32
*
-*/
DWORD CRCdwCrc32 (PBYTE pbyData, UINT cbByte, DWORD dwCrcSeed)
DWORD CRCdwCrc32(PBYTE pbyData, UINT cbByte, DWORD dwCrcSeed)
{
DWORD dwCrc;
DWORD dwCrc;

dwCrc = dwCrcSeed;
while (cbByte--) {
dwCrc = s_adwCrc32Table[(BYTE)((dwCrc ^ (*pbyData)) & 0xFF)] ^ (dwCrc >> 8);
pbyData++;
}
dwCrc = dwCrcSeed;
while (cbByte--) {
dwCrc = s_adwCrc32Table[(BYTE)((dwCrc ^ (*pbyData)) & 0xFF)] ^
(dwCrc >> 8);
pbyData++;
}

return dwCrc;
return dwCrc;
}


Expand All @@ -164,7 +165,7 @@ DWORD CRCdwCrc32 (PBYTE pbyData, UINT cbByte, DWORD dwCrcSeed)
* Return Value: CRC-32
*
-*/
DWORD CRCdwGetCrc32 (PBYTE pbyData, UINT cbByte)
DWORD CRCdwGetCrc32(PBYTE pbyData, UINT cbByte)
{
return ~CRCdwCrc32(pbyData, cbByte, 0xFFFFFFFFL);
}
Expand Down

0 comments on commit 45c6564

Please sign in to comment.