]> diplodocus.org Git - nmh/blobdiff - uip/replsbr.c
sizeof char is always 1, so don't bother to divide by it.
[nmh] / uip / replsbr.c
index 2cb06ecec460927f2fa643b975acef3f2f536fc8..e63ce75519191b037041055dacfd28c7d9099818 100644 (file)
@@ -24,15 +24,6 @@ static char *dfhost = NULL;
 static struct mailname mq;
 static int nodupcheck = 0;             /* If set, no check for duplicates */
 
 static struct mailname mq;
 static int nodupcheck = 0;             /* If set, no check for duplicates */
 
-/*
- * Buffer size for content part of header fields.
- * We want this to be large enough so that we don't
- * do a lot of extra FLDPLUS calls on m_getfld but
- * small enough so that we don't snarf the entire
- * message body when we're not going to use any of it.
- */
-#define        SBUFSIZ NMH_BUFSIZ
-
 static char *addrcomps[] = {
     "from",
     "sender",
 static char *addrcomps[] = {
     "from",
     "sender",
@@ -65,7 +56,7 @@ replout (FILE *inb, char *msg, char *drft, struct msgs *mp, int outputlinelen,
 {
     int state, i;
     struct comp *cptr;
 {
     int state, i;
     struct comp *cptr;
-    char tmpbuf[SBUFSIZ];
+    char tmpbuf[NMH_BUFSIZ];
     struct format *fmt;
     char **ap;
     int        char_read = 0, format_len, mask;
     struct format *fmt;
     char **ap;
     int        char_read = 0, format_len, mask;
@@ -393,10 +384,10 @@ insert (struct mailname *np)
        return 0;
 
     for (mp = &mq; mp->m_next; mp = mp->m_next) {
        return 0;
 
     for (mp = &mq; mp->m_next; mp = mp->m_next) {
-       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 : ""))
+       if (!strcasecmp (FENDNULL(np->m_host),
+                        FENDNULL(mp->m_next->m_host))  &&
+           !strcasecmp (FENDNULL(np->m_mbox),
+                        FENDNULL(mp->m_next->m_mbox)))
            return 0;
     }
     if (!ccme && ismymbox (np))
            return 0;
     }
     if (!ccme && ismymbox (np))
@@ -435,7 +426,7 @@ replfilter (FILE *in, FILE *out, char *filter, int fmtproc)
        adios (filter, "unable to read");
 
     rewind (in);
        adios (filter, "unable to read");
 
     rewind (in);
-    lseek (fileno(in), (off_t) 0, SEEK_SET);
+    lseek(fileno(in), 0, SEEK_SET);
 
     arglist = argsplit(mhlproc, &mhl, &argnum);
 
 
     arglist = argsplit(mhlproc, &mhl, &argnum);