diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c
index 7948e3749ff8f98fe2827cd76a1ef475919a65b9..e1ede769689508fca3fb174cb3260701ccc589a1 100644
--- a/lib/http_ntlm.c
+++ b/lib/http_ntlm.c
@@ -212,7 +212,7 @@ static void mkhash(char *password,
   static const unsigned char magic[] = {
     0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25
   };
-  int i;
+  unsigned int i;
   size_t len = strlen(password);
 
   /* make it fit at least 14 bytes */