aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--driver.c12
-rw-r--r--fetchmail.c8
-rw-r--r--imap.c4
-rw-r--r--netrc.c2
-rw-r--r--rfc822.c2
-rw-r--r--sink.c6
-rw-r--r--uid.c5
7 files changed, 30 insertions, 9 deletions
diff --git a/driver.c b/driver.c
index 38da2d87..4d2a37db 100644
--- a/driver.c
+++ b/driver.c
@@ -1145,12 +1145,14 @@ static int readbody(int sock, struct query *ctl, flag forward, int len)
/* check for end of message */
if (protocol->delimited && *inbufp == '.')
+ {
if (inbufp[1] == '\r' && inbufp[2] == '\n' && inbufp[3] == '\0')
break;
else if (inbufp[1] == '\n' && inbufp[2] == '\0')
break;
else
msglen--; /* subtract the size of the dot escape */
+ }
msglen += linelen;
@@ -1408,11 +1410,11 @@ struct query *ctl; /* parsed options with merged-in defaults */
const struct method *proto; /* protocol method table */
const int maxfetch; /* maximum number of messages to fetch */
{
- int ok, js;
+ int js;
#ifdef HAVE_VOLATILE
- volatile int mailserver_socket = -1; /* pacifies -Wall */
+ volatile int ok, mailserver_socket = -1; /* pacifies -Wall */
#else
- int mailserver_socket = -1;
+ int ok, mailserver_socket = -1;
#endif /* HAVE_VOLATILE */
const char *msg;
void (*pipesave)(int);
@@ -1689,10 +1691,12 @@ const int maxfetch; /* maximum number of messages to fetch */
++pass;
if (outlevel >= O_DEBUG)
+ {
if (idp->id)
report(stdout, _("selecting or re-polling folder %s\n"), idp->id);
else
report(stdout, _("selecting or re-polling default folder\n"));
+ }
/* compute # of messages and number of new messages waiting */
ok = (protocol->getrange)(mailserver_socket, ctl, idp->id, &count, &new, &bytes);
@@ -1707,6 +1711,7 @@ const int maxfetch; /* maximum number of messages to fetch */
(void) sprintf(buf, _("%s at %s"),
ctl->remotename, ctl->server.truename);
if (outlevel > O_SILENT)
+ {
if (count == -1) /* only used for ETRN */
report(stdout, _("Polling %s\n"), ctl->server.truename);
else if (count != 0)
@@ -1731,6 +1736,7 @@ const int maxfetch; /* maximum number of messages to fetch */
if (pass == 1 && (run.poll_interval == 0 || outlevel >= O_VERBOSE))
report(stdout, _("No mail for %s\n"), buf);
}
+ }
/* very important, this is where we leave the do loop */
if (count == 0)
diff --git a/fetchmail.c b/fetchmail.c
index 1ff5fd9a..61737774 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -1221,10 +1221,12 @@ static int load_params(int argc, char **argv, int optind)
* multidrop mail, set an appropriate default here.
*/
if (!run.postmaster)
+ {
if (getuid()) /* ordinary user */
run.postmaster = user;
else /* root */
run.postmaster = "postmaster";
+ }
return(implicitmode);
}
@@ -1430,6 +1432,7 @@ static void dump_params (struct runctl *runp,
if (!ctl->password)
printf(_(" Password will be prompted for.\n"));
else if (outlevel >= O_VERBOSE)
+ {
if (ctl->server.protocol == P_APOP)
printf(_(" APOP secret = \"%s\".\n"),
visbuf(ctl->password));
@@ -1439,6 +1442,7 @@ static void dump_params (struct runctl *runp,
else
printf(_(" Password = \"%s\".\n"),
visbuf(ctl->password));
+ }
}
if (ctl->server.protocol == P_POP3
@@ -1541,10 +1545,12 @@ static void dump_params (struct runctl *runp,
else if (outlevel >= O_VERBOSE)
printf(_(" No SMTP message batch limit (--batchlimit 0).\n"));
if (ctl->server.protocol == P_IMAP)
+ {
if (NUM_NONZERO(ctl->expunge))
printf(_(" Deletion interval between expunges forced to %d (--expunge %d).\n"), ctl->expunge, ctl->expunge);
else if (outlevel >= O_VERBOSE)
printf(_(" No forced expunges (--expunge 0).\n"));
+ }
}
if (ctl->bsmtp)
printf(_(" Messages will be appended to %s as BSMTP\n"), visbuf(ctl->bsmtp));
@@ -1688,6 +1694,7 @@ static void dump_params (struct runctl *runp,
printf(_(" No plugout command specified.\n"));
if (ctl->server.protocol > P_POP2 && (ctl->server.protocol != P_ETRN))
+ {
if (!ctl->oldsaved)
printf(_(" No UIDs saved from this host.\n"));
else
@@ -1703,6 +1710,7 @@ static void dump_params (struct runctl *runp,
for (idp = ctl->oldsaved; idp; idp = idp->next)
printf("\t%s\n", idp->id);
}
+ }
if (ctl->properties)
printf(_(" Pass-through properties \"%s\".\n"),
diff --git a/imap.c b/imap.c
index 2d3d470c..128d1e0f 100644
--- a/imap.c
+++ b/imap.c
@@ -765,7 +765,7 @@ static int do_cram_md5 (int sock, struct query *ctl)
* [RFC822] as described in [POP3].
*/
- if (result = gen_recv (sock, buf1, sizeof (buf1))) {
+ if ((result = gen_recv (sock, buf1, sizeof (buf1)))) {
return result;
}
@@ -827,7 +827,7 @@ static int do_cram_md5 (int sock, struct query *ctl)
strcat (buf1, "\r\n");
SockWrite (sock, buf1, strlen (buf1));
- if (result = gen_recv (sock, buf1, sizeof (buf1)))
+ if ((result = gen_recv (sock, buf1, sizeof (buf1))))
return result;
if (strstr (buf1, "OK")) {
diff --git a/netrc.c b/netrc.c
index e275c9d3..70f3361d 100644
--- a/netrc.c
+++ b/netrc.c
@@ -114,10 +114,12 @@ parse_netrc (file)
/* If the line is empty... */
if (!*p)
+ {
if (last_token == tok_macdef) /* end of macro */
last_token = tok_nothing;
else
continue; /* otherwise ignore it */
+ }
/* If we are defining macros, then skip parsing the line. */
while (*p && last_token != tok_macdef)
diff --git a/rfc822.c b/rfc822.c
index 9195d9bf..9dd17272 100644
--- a/rfc822.c
+++ b/rfc822.c
@@ -80,10 +80,12 @@ const char *host; /* server hostname */
}
#endif /* TESTMAIN */
if (state != 2)
+ {
if (*from == '(')
++parendepth;
else if (*from == ')')
--parendepth;
+ }
if (!parendepth && !has_host_part)
switch (state)
diff --git a/sink.c b/sink.c
index 52efa37a..6dc91b58 100644
--- a/sink.c
+++ b/sink.c
@@ -43,7 +43,7 @@
#endif
/* makes the open_sink()/close_sink() pair non-reentrant */
-static lmtp_responses;
+static int lmtp_responses;
static int smtp_open(struct query *ctl)
/* try to open a socket to the appropriate SMTP server for this query */
@@ -204,6 +204,7 @@ int stuffline(struct query *ctl, char *buf)
* decorated any . lines it sends back up.
*/
if (*buf == '.')
+ {
if (ctl->server.base_protocol->delimited) /* server has already byte-stuffed */
{
if (ctl->mda)
@@ -218,6 +219,7 @@ int stuffline(struct query *ctl, char *buf)
else
/* leave it alone */;
}
+ }
/* we may need to strip carriage returns */
if (ctl->stripcr)
@@ -896,6 +898,7 @@ int close_sink(struct query *ctl, struct msgblk *msg, flag forward)
* to people who got it the first time.
*/
if (ctl->listener == LMTP_MODE)
+ {
if (lmtp_responses == 0)
{
SMTP_ok(ctl->smtp_socket);
@@ -958,6 +961,7 @@ int close_sink(struct query *ctl, struct msgblk *msg, flag forward)
"LSMTP partial delivery failure.\r\n",
errors, responses));
}
+ }
}
return(TRUE);
diff --git a/uid.c b/uid.c
index 0d9c0f71..934eae82 100644
--- a/uid.c
+++ b/uid.c
@@ -70,7 +70,6 @@ static struct idlist *scratchlist;
void initialize_saved_lists(struct query *hostlist, const char *idfile)
/* read file of saved IDs and attach to each host */
{
- int st;
FILE *tmpfp;
struct query *ctl;
@@ -82,14 +81,14 @@ void initialize_saved_lists(struct query *hostlist, const char *idfile)
if ((tmpfp = fopen(idfile, "r")) != (FILE *)NULL)
{
char buf[POPBUFSIZE+1];
- char *host;
+ char *host = NULL; /* pacify -Wall */
char *user;
char *id;
char *atsign; /* temp pointer used in parsing user and host */
char *delimp1;
char saveddelim1;
char *delimp2;
- char saveddelim2;
+ char saveddelim2 = '\0'; /* pacify -Wall */
while (fgets(buf, POPBUFSIZE, tmpfp) != (char *)NULL)
{