advapi32: Remove unneeded casts

Andrew Talbot andrew.talbot at talbotville.com
Sat Dec 29 09:37:21 CST 2007


Changelog:
    advapi32: Remove unneeded casts.

diff --git a/dlls/advapi32/crypt_md4.c b/dlls/advapi32/crypt_md4.c
index 5f4e709..3341f08 100644
--- a/dlls/advapi32/crypt_md4.c
+++ b/dlls/advapi32/crypt_md4.c
@@ -58,7 +58,7 @@ static void byteReverse( unsigned char *buf, unsigned longs )
     unsigned int t;
 
     do {
-        t = (unsigned int)((unsigned)buf[3] << 8 | buf[2]) << 16 |
+        t = ((unsigned)buf[3] << 8 | buf[2]) << 16 |
             ((unsigned)buf[1] << 8 | buf[0]);
         *(unsigned int *)buf = t;
         buf += 4;
@@ -90,7 +90,7 @@ VOID WINAPI MD4Update( MD4_CTX *ctx, const unsigned char *buf, unsigned int len
     /* Update bitcount */
     t = ctx->i[0];
 
-    if ((ctx->i[0] = t + ((unsigned int)len << 3)) < t)
+    if ((ctx->i[0] = t + (len << 3)) < t)
         ctx->i[1]++;        /* Carry from low to high */
 
     ctx->i[1] += len >> 29;
diff --git a/dlls/advapi32/crypt_md5.c b/dlls/advapi32/crypt_md5.c
index d326715..3cb039a 100644
--- a/dlls/advapi32/crypt_md5.c
+++ b/dlls/advapi32/crypt_md5.c
@@ -55,7 +55,7 @@ static void byteReverse( unsigned char *buf, unsigned longs )
     unsigned int t;
 
     do {
-        t = (unsigned int)((unsigned)buf[3] << 8 | buf[2]) << 16 |
+        t = ((unsigned)buf[3] << 8 | buf[2]) << 16 |
             ((unsigned)buf[1] << 8 | buf[0]);
         *(unsigned int *)buf = t;
         buf += 4;
@@ -87,7 +87,7 @@ VOID WINAPI MD5Update( MD5_CTX *ctx, const unsigned char *buf, unsigned int len
     /* Update bitcount */
     t = ctx->i[0];
 
-    if ((ctx->i[0] = t + ((unsigned int)len << 3)) < t)
+    if ((ctx->i[0] = t + (len << 3)) < t)
         ctx->i[1]++;        /* Carry from low to high */
 
     ctx->i[1] += len >> 29;



More information about the wine-patches mailing list