* lib/fcntl_.h: Prefer #include_next <foo.h> to #include
[gnulib.git] / lib / md4.c
index 2d943b9..789cce0 100644 (file)
--- 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 <config.h>
-#endif
+#include <config.h>
 
 #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++)
        {