]> diplodocus.org Git - nmh/blobdiff - sbr/m_getfld.c
Makefile.am: Alter long lists to be sorted, one entry per line.
[nmh] / sbr / m_getfld.c
index fe8e927b4088a73724d5b9c2e8d8a7e637265e32..0f068031ad681c71e14a62b629ab92b508821550 100644 (file)
@@ -664,7 +664,7 @@ m_getfld (m_getfld_state_t *gstate, char name[NAMESZ], char *buf, int *bufsz,
            max = *bufsz-1;
            /* Back up and store the current position. */
            bp = --s->readpos;
            max = *bufsz-1;
            /* Back up and store the current position. */
            bp = --s->readpos;
-           c = s->end - s->readpos < max  ?  s->end - s->readpos  :  max;
+            c = min(s->end - s->readpos, max);
            if (s->msg_style != MS_DEFAULT && c > 1) {
                /*
                 * packed maildrop - only take up to the (possible)
            if (s->msg_style != MS_DEFAULT && c > 1) {
                /*
                 * packed maildrop - only take up to the (possible)
@@ -793,9 +793,8 @@ m_unknown(m_getfld_state_t *gstate, FILE *iob)
        if ((c = Getc (s)) == EOF) {
            *cp = '\0';
            break;
        if ((c = Getc (s)) == EOF) {
            *cp = '\0';
            break;
-       } else {
-           *cp = c;
        }
        }
+        *cp = c;
     }
 
     if (i == sizeof from-1  &&  strncmp (text, "From ", sizeof from-1) == 0) {
     }
 
     if (i == sizeof from-1  &&  strncmp (text, "From ", sizeof from-1) == 0) {
@@ -876,9 +875,8 @@ m_Eom (m_getfld_state_t s)
        if ((c2 = Getc (s)) == EOF) {
            *cp = '\0';
            break;
        if ((c2 = Getc (s)) == EOF) {
            *cp = '\0';
            break;
-       } else {
-           *cp = c2;
        }
        }
+        *cp = c2;
     }
 
     if (i != s->edelimlen  ||
     }
 
     if (i != s->edelimlen  ||