commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r802182 - /commons/sandbox/runtime/trunk/src/main/native/shared/md5.c
Date Fri, 07 Aug 2009 20:55:11 GMT
Author: mturk
Date: Fri Aug  7 20:55:10 2009
New Revision: 802182

URL: http://svn.apache.org/viewvc?rev=802182&view=rev
Log:
Cast to byte

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

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/md5.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/md5.c?rev=802182&r1=802181&r2=802182&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/md5.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/md5.c Fri Aug  7 20:55:10 2009
@@ -45,20 +45,20 @@
 #define LO_NIBBLE_HEX(a) (basis16[((unsigned char)(a) & 0x0F)])
 
 #define PUT_64BIT_LE(cp, value) do {            \
-    (cp)[7] = (value) >> 56;                    \
-    (cp)[6] = (value) >> 48;                    \
-    (cp)[5] = (value) >> 40;                    \
-    (cp)[4] = (value) >> 32;                    \
-    (cp)[3] = (value) >> 24;                    \
-    (cp)[2] = (value) >> 16;                    \
-    (cp)[1] = (value) >> 8;                     \
-    (cp)[0] = (value); } while (0)
+    (cp)[7] = (acr_byte_t)((value) >> 56);      \
+    (cp)[6] = (acr_byte_t)((value) >> 48);      \
+    (cp)[5] = (acr_byte_t)((value) >> 40);      \
+    (cp)[4] = (acr_byte_t)((value) >> 32);      \
+    (cp)[3] = (acr_byte_t)((value) >> 24);      \
+    (cp)[2] = (acr_byte_t)((value) >> 16);      \
+    (cp)[1] = (acr_byte_t)((value) >> 8);       \
+    (cp)[0] = (acr_byte_t)((value)); } while (0)
 
 #define PUT_32BIT_LE(cp, value) do {            \
-    (cp)[3] = (value) >> 24;                    \
-    (cp)[2] = (value) >> 16;                    \
-    (cp)[1] = (value) >> 8;                     \
-    (cp)[0] = (value); } while (0)
+    (cp)[3] = (acr_byte_t)((value) >> 24);      \
+    (cp)[2] = (acr_byte_t)((value) >> 16);      \
+    (cp)[1] = (acr_byte_t)((value) >> 8);       \
+    (cp)[0] = (acr_byte_t)((value)); } while (0)
 
 static acr_byte_t PADDING[ACR_MD5_BLOCK_LENGTH] = {
     0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,



Mime
View raw message