From 9b33f5d2f0f3ba4592dbfe9ef2cf64c38dcfaaff Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Mon, 3 Sep 2007 21:43:34 +0000 Subject: [PATCH] Attempted fix of warnings when HAS_OPENSSL is not defined --- src/funcrypt.c | 4 ++-- src/mycrypt.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/funcrypt.c b/src/funcrypt.c index dfd5e10..f3e5d70 100644 --- a/src/funcrypt.c +++ b/src/funcrypt.c @@ -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 { diff --git a/src/mycrypt.c b/src/mycrypt.c index 43e202a..7e9e4d0 100644 --- a/src/mycrypt.c +++ b/src/mycrypt.c @@ -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; -- 2.30.2