X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fspost.c;h=5bc41d8a25cde8b2e5375255b8b1040f42e11007;hb=794dab6aa5027ffaf024506140c258f6a0a9322d;hp=58d4ae39259c5df7fd911c3511239ca58a9b59c1;hpb=2b5c5779f2eb63019446a69c3e2c6f871e71c3df;p=mmh diff --git a/uip/spost.c b/uip/spost.c index 58d4ae3..5bc41d8 100644 --- a/uip/spost.c +++ b/uip/spost.c @@ -346,7 +346,11 @@ main (int argc, char **argv) out = stdout; } else { +#ifdef HAVE_MKSTEMP + mkstemp (tmpfil); +#else mktemp (tmpfil); +#endif if ((out = fopen (tmpfil, "w")) == NULL) adios (tmpfil, "unable to create"); chmod (tmpfil, 0600); @@ -450,6 +454,7 @@ main (int argc, char **argv) } execv ( sendmail, sargv); adios ( sendmail, "can't exec"); + return 0; /* dead code to satisfy the compiler */ } /* DRAFT GENERATION */ @@ -485,7 +490,7 @@ putfmt (char *name, char *str, FILE *out) if (hdr->flags & HFCC) { if ((cp = strrchr(str, '\n'))) *cp = 0; - for (cp = pp = str; cp = strchr(pp, ','); pp = cp) { + for (cp = pp = str; (cp = strchr(pp, ',')); pp = cp) { *cp++ = 0; insert_fcc (hdr, pp); } @@ -500,7 +505,7 @@ putfmt (char *name, char *str, FILE *out) } #endif /* notdef */ - if (*str != '\n' && *str != '\0') + if (*str != '\n' && *str != '\0') { if (aliasflg && hdr->flags & HTRY) { /* this header contains address(es) that we have to do * alias expansion on. Because of the saved state in @@ -527,6 +532,7 @@ putfmt (char *name, char *str, FILE *out) } else { fprintf (out, "%s: %s", name, str ); } + } }