Attempted fix of warnings when HAS_OPENSSL is not defined
authorAri Johnson <ari@cobramush.org>
Mon, 3 Sep 2007 21:43:34 +0000 (21:43 +0000)
committerAri Johnson <ari@cobramush.org>
Mon, 3 Sep 2007 21:43:34 +0000 (21:43 +0000)
src/funcrypt.c
src/mycrypt.c

index dfd5e10a170e7c08e8468d386920a04b73f40f73..f3e5d70def0ead2a8cf3710424a83f6d72846d23 100644 (file)
@@ -144,7 +144,7 @@ FUNCTION(fun_sha0)
   shsInit(&shsInfo);
   shsUpdate(&shsInfo, (const BYTE *) args[0], arglens[0]);
   shsFinal(&shsInfo);
-  safe_format(buff, bp, "%0lx%0lx%0lx%0lx%0lx", shsInfo.digest[0],
+  safe_format(buff, bp, "%0x%0x%0x%0x%0x", shsInfo.digest[0],
              shsInfo.digest[1], shsInfo.digest[2], shsInfo.digest[3],
              shsInfo.digest[4]);
 #endif
@@ -178,7 +178,7 @@ FUNCTION(fun_digest)
     shsInit(&shsInfo);
     shsUpdate(&shsInfo, (const BYTE *) args[0], arglens[0]);
     shsFinal(&shsInfo);
-    safe_format(buff, bp, "%0lx%0lx%0lx%0lx%0lx", shsInfo.digest[0],
+    safe_format(buff, bp, "%0x%0x%0x%0x%0x", shsInfo.digest[0],
                shsInfo.digest[1], shsInfo.digest[2], shsInfo.digest[3],
                shsInfo.digest[4]);
   } else {
index 43e202a540768987084449fad790e0217714e834..7e9e4d05e8adf28d8ae87725f322ebd2b5297551 100644 (file)
@@ -56,7 +56,7 @@ mush_crypt(const char *key)
   shsInit(&shsInfo);
   shsUpdate(&shsInfo, (const BYTE *) key, strlen(key));
   shsFinal(&shsInfo);
-  sprintf(crypt_buff, "XX%lu%lu", shsInfo.digest[0], shsInfo.digest[1]);
+  sprintf(crypt_buff, "XX%u%u", shsInfo.digest[0], shsInfo.digest[1]);
 #endif
 
   return crypt_buff;