fflush (stdout);
fflush (stderr);
- done (1);
- /* NOTREACHED */
+ return done (1);
}
goto losing_ftp;
#endif
- if (cachefile[0])
+ if (cachefile[0]) {
if (caching)
chmod (cachefile, cachetype ? m_gmprot () : 0444);
else {
fseek (gp, 0L, SEEK_SET);
- while ((cc = fread (buffer, sizeof(*buffer), sizeof(buffer), gp))
+ while ((cc= fread (buffer, sizeof(*buffer), sizeof(buffer), gp))
> 0)
fwrite (buffer, sizeof(*buffer), cc, fp);
fflush (fp);
}
umask (mask);
}
+ }
fseek (ce->ce_fp, 0L, SEEK_SET);
*file = ce->ce_file;
/* search the arguments for a folder name */
for (ap = arguments; *ap; ap++) {
cp = *ap;
- if (*cp == '+' || *cp == '@')
+ if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder per #forw directive");
else
folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ }
}
/* else, use the current folder */
{
char *cp;
- for (cp = file + 1; cp = strchr(cp, '/'); cp++) {
+ for (cp = file + 1; (cp = strchr(cp, '/')); cp++) {
struct stat st;
*cp = '\0';
* static prototypes
*/
static int output_content (CT, FILE *);
-static int output_headers (CT, FILE *);
+static void output_headers (CT, FILE *);
static int writeExternalBody (CT, FILE *);
static int write8Bit (CT, FILE *);
static int writeQuoted (CT, FILE *);
* Output all the header fields for a content
*/
-static int
+static void
output_headers (CT ct, FILE *out)
{
HF hp;
fflush (stdout);
fflush (stderr);
- done (1);
- /* NOTREACHED */
+ return done (1);
}
goto losing_ftp;
#endif
- if (cachefile[0])
+ if (cachefile[0]) {
if (caching)
chmod (cachefile, cachetype ? m_gmprot () : 0444);
else {
fseek (gp, 0L, SEEK_SET);
- while ((cc = fread (buffer, sizeof(*buffer), sizeof(buffer), gp))
+ while ((cc= fread (buffer, sizeof(*buffer), sizeof(buffer), gp))
> 0)
fwrite (buffer, sizeof(*buffer), cc, fp);
fflush (fp);
}
umask (mask);
}
+ }
fseek (ce->ce_fp, 0L, SEEK_SET);
*file = ce->ce_file;
for (part = m->mp_parts; part; part = part->mp_next) {
p = part->mp_part;
- if (p->c_pid > OK)
+ if (p->c_pid > OK) {
if (kill (p->c_pid, 0) == NOTOK)
p->c_pid = 0;
else
kids++;
+ }
}
while (kids > 0 && (pid = wait (&status)) != NOTOK) {
if (tarP) {
ct->c_showproc = add (zP ? "%euncompress | tar tvf -"
: "%etar tvf -", NULL);
- if (!ct->c_storeproc)
+ if (!ct->c_storeproc) {
if (autosw) {
ct->c_storeproc = add (zP ? "| uncompress | tar xvpf -"
: "| tar xvpf -", NULL);
ct->c_umask = 0022;
} else {
- ct->c_storeproc = add (zP ? "%m%P.tar.Z" : "%m%P.tar", NULL);
+ ct->c_storeproc= add (zP ? "%m%P.tar.Z" : "%m%P.tar", NULL);
}
+ }
}
}
m_reset ();
- done (0);
+ return done (0);
}
cmdp->direction = STDIO;
cmdp->stream = NULL;
- for (cp = buffer; c = *cp; cp++) {
+ for (cp = buffer; (c = *cp); cp++) {
if (!isspace (c))
break;
}
cp++;
}
cmdp->redirect = pp + 1;/* sigh */
- for (; c = *cp; cp++)
+ for (; (c = *cp); cp++)
if (!isspace (c))
break;
if (c == 0) {
fmt2peer (RC_ERR, "pINI protocol screw-up");
done (1); /* NOTREACHED */
}
+
+ return 1; /* dead code to satisfy the compiler */
}
for (msgnum = mp->curmsg; msgnum <= mp->hghmsg; msgnum++)
if (does_exist (mp, msgnum))
i++;
- if (i-- > 0)
+ if (i-- > 0) {
if (topcur)
k = i >= k ? 1 : k - i;
else
k -= i > j ? j : i;
+ }
i = j = 0;
n = 1;
fmt2peer (RC_ERR, "pTTY protocol screw-up");
done (1); /* NOTREACHED */
}
+
+ return 1; /* dead code to satisfy compiler */
}
packsw = 0;
continue;
}
- if (*cp == '+' || *cp == '@')
+ if (*cp == '+' || *cp == '@') {
if (folder) {
advise (NULL, "only one folder at a time!\n");
return;
else
folder = fmsh ? path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF)
: cp + 1;
+ }
else
if (msg) {
advise (NULL, "only one message at a time!\n");
}
}
- if (!addsw && !deletesw && !listsw)
+ if (!addsw && !deletesw && !listsw) {
if (seqp)
addsw++;
else
if (!msgp)
msgs[msgp++] = "all";
}
+ }
if (!msgp)
msgs[msgp++] = listsw ? "all" :"cur";
ebp = ibuf + strlen (ibuf);
}
c = *p2++;
- if (lf && c != '\n')
+ if (lf && c != '\n') {
if (c != ' ' && c != '\t') {
--p2;
break;
}
else
lf = 0;
- if (c == '\n')
+ }
+ if (c == '\n') {
if (body)
break;
else {
lf++;
c = ' ';
}
+ }
if (c && p1 < &linebuf[LBSIZE - 1])
*p1++ = c;
}
char *cp, buffer[BUFSIZ];
vsnprintf (buffer, sizeof(buffer), fmt, ap);
- if (poprint)
+ if (poprint) {
if (pophack) {
if ((cp = strchr (buffer, ' ')))
*cp = 0;
}
else
fprintf (stderr, "---> %s\n", buffer);
+ }
if (putline (buffer, output) == NOTOK)
return NOTOK;
if (verbose)
printf (partno ? "Partial Message #%s Processed\n" : "Message Processed\n",
partno);
- done (0);
+ return done (0);
}
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);
}
}
tmpaddrs.m_next = NULL;
- for (count = 0; cp = getname (str); count++)
+ for (count = 0; (cp = getname (str)); count++)
if ((mp = getm (cp, NULL, 0, AD_HOST, NULL))) {
if (tmpaddrs.m_next)
np->m_next = mp;
if (mp->m_mbox == NULL || ((flags & HTRY) && !insert (mp)))
return 0;
- if (!fill_in && (flags & (HBCC | HDCC)) || mp->m_ingrp)
+ if ((!fill_in && (flags & (HBCC | HDCC))) || mp->m_ingrp)
return 1;
if (!nameoutput) {
}
len = strlen (cp);
- if (linepos != nameoutput)
+ if (linepos != nameoutput) {
if (len + linepos + 2 > outputlinelen)
fprintf (out, ",\n%*s", linepos = nameoutput, "");
else {
fputs (", ", out);
linepos += 2;
}
+ }
fputs (cp, out);
linepos += len;
cp = fill_in ? group : concat (group, ";", NULL);
len = strlen (cp);
- if (linepos > nameoutput)
+ if (linepos > nameoutput) {
if (len + linepos + 2 > outputlinelen) {
fprintf (out, ",\n%*s", nameoutput, "");
linepos = nameoutput;
fputs (", ", out);
linepos += 2;
}
+ }
fputs (cp, out);
linepos += len;
* prototypes
*/
static void rcvdistout (FILE *, char *, char *);
-void done (int);
+int done (int);
int
default:
done (pidXwait(child_id, postproc));
}
-/* NOTREACHED */
+
+ return 0; /* dead code to satisfy the compiler */
}
/* very similar to routine in replsbr.c */
}
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) {
fclose (out);
free (scanl);
- for (nxtbuf = compbuffers, i = ncomps; cptr = *savecomp++; nxtbuf++, i--)
+ for (nxtbuf = compbuffers, i = ncomps; (cptr = *savecomp++); nxtbuf++, i--)
free (cptr->c_text);
while (i-- > 0)
free (*nxtbuf++);
}
-void
+int
done (int status)
{
if (backup[0])
unlink (tmpfil);
exit (status ? RCV_MBX : RCV_MOK);
+ return 1; /* dead code to satisfy the compiler */
}
fclose (uf);
exit (RCV_MOK);
+ return 0; /* dead code to satisfy the compiler */
}
setpgid ((pid_t) 0, getpid ()); /* put in own process group */
execvp (vec[0], vec);
_exit (-1);
+ return 1; /* dead code to satisfy compiler */
}
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) {
/* 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 */
}
/* 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);
dlist[i] = &smsgs[i];
dlist[nmsgs] = 0;
- if (verbose) /* announce what we're doing */
+ if (verbose) { /* announce what we're doing */
if (subjsort)
printf ("sorting by %s-major %s-minor\n",
submajor ? subjsort : datesw,
submajor ? datesw : subjsort);
else
printf ("sorting by datefield %s\n", datesw);
+ }
/* first sort by date, or by subject-major, date-minor */
qsort ((char *) dlist, nmsgs, sizeof(*dlist),
seq_save (mp); /* synchronize message sequences */
context_save (); /* save the context file */
folder_free (mp); /* free folder/message structure */
- done (0);
+ return done (0);
}
static int
}
execv ( sendmail, sargv);
adios ( sendmail, "can't exec");
+ return 0; /* dead code to satisfy the compiler */
}
/* DRAFT GENERATION */
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);
}
}
#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
} else {
fprintf (out, "%s: %s", name, str );
}
+ }
}
adios (NULL, "missing -viamail \"mailpath\" switch");
via_mail (f1, f2, f3, f4, f5, delay, f7);
- /* NOTREACHED */
+ return 0; /* dead code to satisfy the compiler */
}
fclose (fp);
if (unlink (tmpfil) == -1)
advise (NULL, "unable to remove temp file %s", tmpfil);
- done (status);
+ return done (status);
}