commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r802322 - in /commons/sandbox/runtime/trunk/src/main/native/shared: md5.c sha.c
Date Sat, 08 Aug 2009 08:42:17 GMT
Author: mturk
Date: Sat Aug  8 08:42:16 2009
New Revision: 802322

URL: http://svn.apache.org/viewvc?rev=802322&view=rev
Log:
remove extra casting

Modified:
    commons/sandbox/runtime/trunk/src/main/native/shared/md5.c
    commons/sandbox/runtime/trunk/src/main/native/shared/sha.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=802322&r1=802321&r2=802322&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/md5.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/md5.c Sat Aug  8 08:42:16 2009
@@ -41,8 +41,8 @@
 static const char basis16[] =
     "0123456789abcdef";
 
-#define HI_NIBBLE_HEX(a) (basis16[((unsigned char)(a) >> 4)])
-#define LO_NIBBLE_HEX(a) (basis16[((unsigned char)(a) & 0x0F)])
+#define HI_NIBBLE_HEX(a) basis16[(a) >> 4]
+#define LO_NIBBLE_HEX(a) basis16[(a) & 0x0F]
 
 #define PUT_64BIT_LE(cp, value) do {            \
     (cp)[7] = (acr_byte_t)((value) >> 56);      \

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/sha.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/sha.c?rev=802322&r1=802321&r2=802322&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/sha.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/sha.c Sat Aug  8 08:42:16 2009
@@ -43,8 +43,8 @@
 static const char basis16[] =
     "0123456789abcdef";
 
-#define HI_NIBBLE_HEX(a) (basis16[((unsigned char)(a) >> 4)])
-#define LO_NIBBLE_HEX(a) (basis16[((unsigned char)(a) & 0x0F)])
+#define HI_NIBBLE_HEX(a) basis16[(a) >> 4]
+#define LO_NIBBLE_HEX(a) basis16[(a) & 0x0F]
 
 
 #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))



Mime
View raw message