]> diplodocus.org Git - nmh/blobdiff - sbr/credentials.c
Note that mhshow-suffix/mhshow- matching is case-insenstive.
[nmh] / sbr / credentials.c
index f6fd15de9f0ae2febe1ef83071397826b51c04da..910e097dd34d9b9d5df253b06f47249742adcf34 100644 (file)
@@ -5,9 +5,15 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
-#include <h/utils.h>
-#include <h/mts.h>
+#include "h/mh.h"
+#include "concat.h"
+#include "ruserpass.h"
+#include "credentials.h"
+#include "context_find.h"
+#include "error.h"
+#include "h/utils.h"
+#include "h/mts.h"
+#include "m_maildir.h"
 
 struct nmh_creds {
     char *host;                /* Hostname corresponding to credentials */
@@ -16,7 +22,8 @@ struct nmh_creds {
 };
 
 void
-init_credentials_file(void) {
+init_credentials_file(void)
+{
     if (credentials_file == NULL) {
         char *cred_style = context_find ("credentials");
 
@@ -29,7 +36,8 @@ init_credentials_file(void) {
             struct stat st;
             char *filename = strchr(cred_style, ':') + 1;
 
-            while (*filename && isspace ((unsigned char) *filename)) ++filename;
+            while (isspace((unsigned char)*filename))
+                filename++;
 
             if (*filename == '/') {
                 credentials_file = filename;
@@ -126,8 +134,8 @@ nmh_cred_get_password(nmh_creds_t creds)
 void
 nmh_credentials_free(nmh_creds_t creds)
 {
-    mh_xfree(creds->host);
-    mh_xfree(creds->user);
+    free(creds->host);
+    free(creds->user);
 
     if (creds->pass) {
        memset(creds->pass, 0, strlen(creds->pass));