advapi32: Remove unneeded casts (2 of 2)

Andrew Talbot Andrew.Talbot at talbotville.com
Sun Jun 3 14:15:14 CDT 2007


Changelog:
    advapi32: Remove unneeded casts.

diff -urN a/dlls/advapi32/crypt_md4.c b/dlls/advapi32/crypt_md4.c
--- a/dlls/advapi32/crypt_md4.c	2007-03-12 13:29:59.000000000 +0000
+++ b/dlls/advapi32/crypt_md4.c	2007-06-03 15:24:40.000000000 +0100
@@ -58,7 +58,7 @@
     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 @@
     /* 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 -urN a/dlls/advapi32/crypt_md5.c b/dlls/advapi32/crypt_md5.c
--- a/dlls/advapi32/crypt_md5.c	2006-05-23 13:47:28.000000000 +0100
+++ b/dlls/advapi32/crypt_md5.c	2007-06-03 15:24:49.000000000 +0100
@@ -55,7 +55,7 @@
     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 @@
     /* 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