X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Freplsbr.c;h=1ea411c26233ef44c738bdd3770554822689a765;hp=57eb6cdce592857b28378323d58581a4a19263aa;hb=6c42153ad9362cc676ea66563bf400d7511b3b68;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b diff --git a/uip/replsbr.c b/uip/replsbr.c index 57eb6cd..1ea411c 100644 --- a/uip/replsbr.c +++ b/uip/replsbr.c @@ -3,6 +3,10 @@ * replsbr.c -- routines to help repl along... * * $Id$ + * + * This code is Copyright (c) 2002, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ #include @@ -160,13 +164,14 @@ replout (FILE *inb, char *msg, char *drft, struct msgs *mp, int outputlinelen, tmpbuf = *nxtbuf++; } else { i = strlen (cp = cptr->c_text) - 1; - if (cp[i] == '\n') + if (cp[i] == '\n') { if (cptr->c_type & CT_ADDR) { cp[i] = '\0'; cp = add (",\n\t", cp); } else { cp = add ("\t", cp); } + } cptr->c_text = add (tmpbuf, cp); } while (state == FLDPLUS) { @@ -252,7 +257,7 @@ finished: /* return dynamically allocated buffers */ free (scanl); - for (nxtbuf = compbuffers, i = ncomps; cptr = *savecomp++; nxtbuf++, i--) + for (nxtbuf = compbuffers, i = ncomps; (cptr = *savecomp++); nxtbuf++, i--) free (cptr->c_text); /* if not nxtbuf, nxtbuf already freed */ while ( i-- > 0) free (*nxtbuf++); /* free unused nxtbufs */ @@ -334,7 +339,7 @@ formataddr (char *orig, char *str) } /* concatenate all the new addresses onto 'buf' */ - for (isgroup = 0; cp = getname (str); ) { + for (isgroup = 0; (cp = getname (str)); ) { if ((mp = getm (cp, dfhost, dftype, AD_NAME, error)) == NULL) { snprintf (baddr, sizeof(baddr), "\t%s -- %s\n", cp, error); badaddrs = add (baddr, badaddrs);