Fix a bunch of warnings in imap code
[apps/madmutt.git] / imap / auth_cram.c
index ba2f42e..d70afb8 100644 (file)
 #define MD5_DIGEST_LEN 16
 
 #include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
 #include <lib-hash/hash.h>
-#include "lib/debug.h"
 
 /* forward declarations */
 static void hmac_md5 (const char *password, char *challenge,
                       unsigned char *response);
 
 /* imap_auth_cram_md5: AUTH=CRAM-MD5 support. */
-imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA * idata, const char *method)
+imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA * idata, const char *method __attribute__ ((unused)))
 {
   char ibuf[LONG_STRING * 2], obuf[LONG_STRING];
   unsigned char hmac_response[MD5_DIGEST_LEN];
@@ -143,11 +143,11 @@ static void hmac_md5 (const char *password, char *challenge,
     MD5Init (&ctx);
     MD5Update (&ctx, (unsigned char *) password, secret_len);
     MD5Final (hash_passwd, &ctx);
-    strfcpy ((char *) secret, (char *) hash_passwd, MD5_DIGEST_LEN);
+    m_strcpy((char *)secret, MD5_DIGEST_LEN, (char *)hash_passwd);
     secret_len = MD5_DIGEST_LEN;
   }
   else
-    strfcpy ((char *) secret, password, sizeof (secret));
+    m_strcpy((char *)secret, sizeof(secret), password);
 
   p_clear(ipad, 1);
   p_clear(opad, 1);