]> diplodocus.org Git - nmh/blobdiff - config/config.c
Fix invalid pointer arithmetic.
[nmh] / config / config.c
index 633293e226bb9987ec3be5596f557e661de8925c..fa3df3bd8068d99ad46772bac8c1a76fb701ee72 100644 (file)
@@ -6,12 +6,12 @@
  */
 
 #include <h/mh.h>
+#include "sbr/m_maildir.h"
 #include <pwd.h>
 
 #define nmhbindir(file) NMHBINDIR#file
 #define nmhlibexecdir(file) NMHLIBEXECDIR#file
 #define nmhetcdir(file) NMHETCDIR#file
-#define nmhdocdir(file) NMHDOCDIR#file
 
 
 /*
@@ -62,9 +62,9 @@ etcpath (char *file)
 
            if (access (epath, R_OK) != NOTOK)
                return epath;
-               /* FALLTHRU */
-try_it:
 
+            /* FALLTHRU */
+try_it:
        default: 
            /* Check nmh Mail directory */
            if (access ((cp = m_mailpath (file)), R_OK) != NOTOK) {
@@ -77,7 +77,7 @@ try_it:
 
     /* Check nmh `etc' directory */
     snprintf (epath, sizeof(epath), nmhetcdir(/%s), file);
-    return (access (epath, R_OK) != NOTOK ? epath : file);
+    return access(epath, R_OK) != NOTOK ? epath : file;
 }