commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r812377 - /commons/sandbox/runtime/trunk/src/main/native/shared/crc32.c
Date Tue, 08 Sep 2009 08:14:39 GMT
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--;
     }



Mime
View raw message