From: Ralph Corderoy Date: Sun, 7 May 2017 13:01:48 +0000 (+0100) Subject: uip/scansbr.c: Replace uses of SBUFSIZ with NMH_BUFSIZ. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/2eea62e1e3ef4496c0a850250d6575a65a6f2f3d?hp=803e139a6595e33a0a636a3e7fd815ebd942a1dc uip/scansbr.c: Replace uses of SBUFSIZ with NMH_BUFSIZ. Now that the former is defined as the latter, the uses of SBUFSIZ were all in the same expression and it simplifies from a ternary expression to NMH_BUFSIZ. --- diff --git a/uip/scansbr.c b/uip/scansbr.c index c7979b64..715357bc 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -12,15 +12,6 @@ #include #include -/* - * 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 only going to display 30 - * characters of it. - */ -#define SBUFSIZ NMH_BUFSIZ - static struct format *fmt; static struct comp *datecomp; /* pntr to "date" comp */ static struct comp *bodycomp; /* pntr to "body" pseudo-comp * @@ -122,9 +113,7 @@ scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, nxtbuf = compbuffers = mh_xcalloc(ncomps, sizeof *nxtbuf); used_buf = mh_xcalloc(ncomps + 1, sizeof *used_buf); used_buf += ncomps+1; *--used_buf = 0; - rlwidth = bodycomp && (width > SBUFSIZ) - ? min (width, NMH_BUFSIZ) - : SBUFSIZ; + rlwidth = NMH_BUFSIZ; for (i = ncomps; i--; ) *nxtbuf++ = mh_xmalloc(rlwidth); }