Andrew Talbot : advapi32: Remove unneeded casts.

Alexandre Julliard julliard at winehq.org
Mon Dec 31 12:32:32 CST 2007


Module: wine
Branch: master
Commit: 05f38321c4b5672238c635c27079cac079074dd1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=05f38321c4b5672238c635c27079cac079074dd1

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Sat Dec 29 15:37:21 2007 +0000

advapi32: Remove unneeded casts.

---

 dlls/advapi32/crypt_md4.c |    4 ++--
 dlls/advapi32/crypt_md5.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

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-cvs mailing list