make m_dupstr return NULL if the string was empty.
[apps/madmutt.git] / mbox.c
diff --git a/mbox.c b/mbox.c
index 3b9fba0..cab71ac 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -16,6 +16,7 @@
 #include <lib-lib/mem.h>
 #include <lib-lib/str.h>
 #include <lib-lib/macros.h>
+#include <lib-lib/file.h>
 
 #include "mutt.h"
 #include "mx.h"
@@ -124,7 +125,7 @@ static int mmdf_parse_mailbox (CONTEXT * ctx)
 
   buf[sizeof (buf) - 1] = 0;
 
-  FOREVER {
+  for (;;) {
     if (fgets (buf, sizeof (buf) - 1, ctx->fp) == NULL)
       break;