X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmd4.c;h=789cce0d0d6073db5a9e2aaf8367c92900c878cc;hb=ab681e53f8100fdb144e0a100d6f2da9ff7c005f;hp=2d943b9f8f023fe71d1d467f0f23be824c85bfd1;hpb=726347d0000dadf7c866a12ed2a6a4f529971c6e;p=gnulib.git diff --git a/lib/md4.c b/lib/md4.c index 2d943b9f8..789cce0d0 100644 --- a/lib/md4.c +++ b/lib/md4.c @@ -20,9 +20,7 @@ /* Adapted by Simon Josefsson from gnulib md5.? and Libgcrypt cipher/md4.c . */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "md4.h" @@ -280,7 +278,7 @@ md4_process_bytes (const void *buffer, size_t len, struct md4_ctx *ctx) #define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) #define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z))) #define H(x, y, z) ((x) ^ (y) ^ (z)) -#define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) +#define rol(x, n) (((x) << (n)) | ((uint32_t) (x) >> (32 - (n)))) #define R1(a,b,c,d,k,s) a=rol(a+F(b,c,d)+x[k],s); #define R2(a,b,c,d,k,s) a=rol(a+G(b,c,d)+x[k]+K1,s); #define R3(a,b,c,d,k,s) a=rol(a+H(b,c,d)+x[k]+K2,s); @@ -311,7 +309,6 @@ md4_process_block (const void *buffer, size_t len, struct md4_ctx *ctx) the loop. */ while (words < endp) { - uint32_t tm; int t; for (t = 0; t < 16; t++) {