]> diplodocus.org Git - nmh/blobdiff - config/config.c
scan(): Don't ioctl(2) for TTY's width every call.
[nmh] / config / config.c
index 7d9f26338c093eba1e3d7fd613397e40a0f29719..c44f1396fcac9fd63b8865f57e6a1449672de062 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <h/mh.h>
+#include "../sbr/m_maildir.h"
 #include <pwd.h>
 
 #define nmhbindir(file) NMHBINDIR#file
@@ -56,15 +57,15 @@ etcpath (char *file)
                }
            }
 
-           snprintf (epath, sizeof(epath), "%s/%s", pp, cp ? cp : "");
+           snprintf (epath, sizeof(epath), "%s/%s", pp, FENDNULL(cp));
            if (cp)
                *--cp = '/';
 
            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) {