]> diplodocus.org Git - nmh/blobdiff - uip/replsbr.c
mh-sequence.man: document new '=+' and '=-' for selecting relative msgs
[nmh] / uip / replsbr.c
index a7a214bf538ad69ac735b7e420510148818d4e89..de37e744227e883de753ef4a29a842621f2143e8 100644 (file)
@@ -12,7 +12,6 @@
 #include <h/fmt_scan.h>
 #include <h/utils.h>
 #include <sys/file.h>          /* L_SET */
-#include <errno.h>
 
 extern short ccto;             /* from repl.c */
 extern short cccc;
@@ -387,8 +386,10 @@ insert (struct mailname *np)
        return 0;
 
     for (mp = &mq; mp->m_next; mp = mp->m_next) {
-       if (!mh_strcasecmp (np->m_host, mp->m_next->m_host)
-               && !mh_strcasecmp (np->m_mbox, mp->m_next->m_mbox))
+       if (!strcasecmp (np->m_host ? np->m_host : "",
+                        mp->m_next->m_host ? mp->m_next->m_host : "")  &&
+           !strcasecmp (np->m_mbox ? np->m_mbox : "",
+                        mp->m_next->m_mbox ? mp->m_next->m_mbox : ""))
            return 0;
     }
     if (!ccme && ismymbox (np))