#if defined(HAVE_WAITPID) /* the POSIX way */
int status;
- while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
+ while (waitpid(-1, &status, WNOHANG) > 0)
continue; /* swallow 'em up. */
#elif defined(HAVE_WAIT3) /* the BSD way */
#if defined(HAVE_UNION_WAIT) && !defined(__FreeBSD__)
(void)close(0);
/* Reopen stdin descriptor on /dev/null */
- if ((fd = open("/dev/null", O_RDWR)) < 0) { /* stdin */
+ if (open("/dev/null", O_RDWR) < 0) { /* stdin */
report(stderr, "cannot open /dev/null: %s\n", strerror(errno));
return(PS_IOERR);
}
smtp_close(ctl, 0);
if (mailserver_socket != -1) {
cleanupSockClose(mailserver_socket);
- mailserver_socket = -1;
}
/* If there was a connect timeout, the socket should be closed.
* mailserver_socket_temp contains the socket to close.
buf++;
}
}
- *tp++ = '\0';
+ *tp = '\0';
return(vbuf);
}
/* env.c ends here */
return PS_AUTHFAIL;
}
else if (outlevel >= O_DEBUG) {
- maj_stat = gss_display_name(&min_stat, target_name, &request_buf,
- &mech_name);
+ gss_display_name(&min_stat, target_name, &request_buf, &mech_name);
report(stderr, GT_("Using service name [%s]\n"),
(char *)request_buf.value);
- maj_stat = gss_release_buffer(&min_stat, &request_buf);
+ gss_release_buffer(&min_stat, &request_buf);
}
gen_send(sock, "%s GSSAPI", command);
if ((ok = gen_transact(sock, "%s", buf)) != 0)
return ok;
got_it = 0;
- while ((ok = gen_recv(sock, buf, sizeof(buf))) == 0)
+ while (gen_recv(sock, buf, sizeof(buf)) == 0)
{
if (DOTLINE(buf))
break;
if (dofastuidl)
return(pop3_fastuidl( sock, ctl, *countp, newp));
/* grab the mailbox's UID list */
- if ((ok = gen_transact(sock, "UIDL")) != 0)
+ if (gen_transact(sock, "UIDL") != 0)
{
/* don't worry, yet! do it the slow way */
- if ((ok = pop3_slowuidl(sock, ctl, countp, newp)))
+ if (pop3_slowuidl(sock, ctl, countp, newp))
{
report(stderr, GT_("protocol error while fetching UIDLs\n"));
return(PS_ERROR);
unsigned long unum;
*newp = 0;
- while ((ok = gen_recv(sock, buf, sizeof(buf))) == PS_SUCCESS)
+ while (gen_recv(sock, buf, sizeof(buf)) == PS_SUCCESS)
{
if (DOTLINE(buf))
break;
if (i + 1 < count)
m += strcspn(words[i+1], "\r\n");
if (l + m > 74)
- l = 0, t = stpcpy(t, "\r\n");
+ t = stpcpy(t, "\r\n");
t = stpcpy(t, words[i]);
if (i + 1 < count) {
t = stpcpy(t, words[i+1]);
*/
struct idlist *idp;
const char *id_me = run.invisible ? ctl->server.truename : fetchmailhost;
- int oldphase = phase;
+ int oldphase;
char *parsed_host = NULL;
errno = 0;
/* SSL_peek says no data... Does he mean no data
or did the connection blow up? If we got an error
then bail! */
- if( 0 != ( n = SSL_get_error(ssl, n) ) ) {
+ if (0 != SSL_get_error(ssl, n)) {
return -1;
}
/* We didn't get an error so read at least one
/* SSL_peek says 0... Does that mean no data
or did the connection blow up? If we got an error
then bail! */
- if( 0 != ( n = SSL_get_error(ssl, n) ) ) {
+ if(0 != SSL_get_error(ssl, n)) {
return -1;
}
tcp = line + linelen - 1;
*tcp++ = '\r';
*tcp++ = '\n';
- *tcp++ = '\0';
- n++;
+ *tcp = '\0';
+ /* n++; - not used later on */
linelen++;
}
else
cp = buf;
*cp++ = '\r';
*cp++ = '\n';
- *cp++ = '\0';
+ *cp = '\0';
n = stuffline(ctl, buf);
if ((size_t)n == strlen(buf))
p += 5;
if (digit(*p)) {
buf[9] = *p++;
- if (digit(*p)) buf[10] = *p++;
+ if (digit(*p)) buf[10] = *p;
return buf;
}
}
p += 4;
if (digit(*p)) {
buf[10] = *p++;
- if (digit(*p)) buf[11] = *p++;
+ if (digit(*p)) buf[11] = *p;
return buf;
}
}