You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/09/08 10:14:39 UTC

svn commit: r812377 - /commons/sandbox/runtime/trunk/src/main/native/shared/crc32.c

Author: mturk
Date: Tue Sep  8 08:14:39 2009
New Revision: 812377

URL: http://svn.apache.org/viewvc?rev=812377&view=rev
Log:
Use generic types

Modified:
    commons/sandbox/runtime/trunk/src/main/native/shared/crc32.c

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/crc32.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/crc32.c?rev=812377&r1=812376&r2=812377&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/crc32.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/crc32.c Tue Sep  8 08:14:39 2009
@@ -39,7 +39,7 @@
 /* crc32.h -- tables for rapid CRC calculation
  * Generated automatically by crc32.c
  */
-static const uint32_t crc_table[8][256] = {
+static const acr_uint32_t crc_table[8][256] = {
   {
     0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
     0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
@@ -543,7 +543,7 @@
 
     c = (u4)crc;
     c = ~c;
-    while (len && ((uintptr_t)buf & 3)) {
+    while (len && ((ptrdiff_t)buf & 3)) {
         c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
         len--;
     }