summaryrefslogtreecommitdiff
path: root/imap/src/ipopd
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2015-07-24 22:13:59 -0600
committerEduardo Chappa <chappa@washington.edu>2015-07-24 22:13:59 -0600
commit9306e227fc7b1b096d4a58f8c06da66603a50a6a (patch)
tree0f4089b0487bb8d6514fcfb79fdd352ebcd527a9 /imap/src/ipopd
parent28063ac494a640111f4483e85f968ee45b4213de (diff)
downloadalpine-9306e227fc7b1b096d4a58f8c06da66603a50a6a.tar.xz
* new version 2.20.9.
* Add command line argument -smimedir, which allows to specify the default path for a directory that contains the public, private, and ca directories. This is useful in case a user has a backup of old certificates that cannot be installed in the ~/.alpine-smime dir. * Update to alpine man page to include documentation on missing command line options such as -nowrite_password_cache, -passfile, -pwdcertdir, and -smimedir. * Various changes in the code to quell some compiler issued warnings in Mac OSX. Reported by Joe St Sauver. This includes the removing deprecated ldap functions from the code and the test in the configure script. The switch to not deprecated functions is done by the use of the belvar structure, which is not completely appropriate for what we are doing, but it is sufficient for our needs. The berval structure is more appropriate for binary data, but it works well with string data, which is what we need. * Various changes in the code to quell some warnings issued by clang 3.5.
Diffstat (limited to 'imap/src/ipopd')
-rw-r--r--imap/src/ipopd/ipop2d.c6
-rw-r--r--imap/src/ipopd/ipop3d.c14
2 files changed, 10 insertions, 10 deletions
diff --git a/imap/src/ipopd/ipop2d.c b/imap/src/ipopd/ipop2d.c
index 14cbe52f..58d4d2d5 100644
--- a/imap/src/ipopd/ipop2d.c
+++ b/imap/src/ipopd/ipop2d.c
@@ -296,7 +296,7 @@ short c_helo (char *t,int argc,char *argv[])
pass = cpystr (tmp);
if (!(s = strchr (u,':'))) { /* want remote mailbox? */
/* no, delimit user from possible admin */
- if (s = strchr (u,'*')) *s++ = '\0';
+ if ((s = strchr (u,'*')) != NULL) *s++ = '\0';
if (server_login (user = cpystr (u),pass,s,argc,argv)) {
syslog (LOG_INFO,"%sLogin user=%.80s host=%.80s",s ? "Admin " : "",
user,tcp_clienthost ());
@@ -355,7 +355,7 @@ short c_fold (char *t)
}
#endif
/* open mailbox, note # of messages */
- if (j = (stream = mail_open (stream,t,NIL)) ? stream->nmsgs : 0) {
+ if ((j = (stream = mail_open (stream,t,NIL)) ? stream->nmsgs : 0) != 0L){
sprintf (tmp,"1:%lu",j); /* fetch fast information for all messages */
mail_fetch_fast (stream,tmp,NIL);
msg = (unsigned long *) fs_get ((stream->nmsgs + 1) *
@@ -429,7 +429,7 @@ short c_retr (char *t)
}
fputs (status,stdout); /* yes, output message */
fputs ("\015\012",stdout); /* delimit header from text */
- if (t = mail_fetch_text (stream,msg[current],NIL,&i,FT_RETURNSTRINGSTRUCT))
+ if ((t = mail_fetch_text (stream,msg[current],NIL,&i,FT_RETURNSTRINGSTRUCT)) != NULL)
while (i) { /* blat the text */
if (!(j = fwrite (t,sizeof (char),i,stdout))) return DONE;
if (i -= j) t += j; /* advance to incomplete data */
diff --git a/imap/src/ipopd/ipop3d.c b/imap/src/ipopd/ipop3d.c
index 41dd96a6..9cb8bffc 100644
--- a/imap/src/ipopd/ipop3d.c
+++ b/imap/src/ipopd/ipop3d.c
@@ -192,9 +192,9 @@ int main (int argc,char *argv[])
AUTHENTICATOR *auth;
PSOUT ("+OK Capability list follows:\015\012");
PSOUT ("TOP\015\012LOGIN-DELAY 180\015\012UIDL\015\012");
- if (s = ssl_start_tls (NIL)) fs_give ((void **) &s);
+ if ((s = ssl_start_tls (NIL)) != NULL) fs_give ((void **) &s);
else PSOUT ("STLS\015\012");
- if (i = !mail_parameters (NIL,GET_DISABLEPLAINTEXT,NIL))
+ if ((i = !mail_parameters (NIL,GET_DISABLEPLAINTEXT,NIL)) != 0L)
PSOUT ("USER\015\012");
/* display secure server authenticators */
for (auth = mail_lookup_auth (1), s = "SASL"; auth; auth = auth->next)
@@ -219,7 +219,7 @@ int main (int argc,char *argv[])
if (pass) fs_give ((void **) &pass);
s = strtok (t," "); /* get mechanism name */
/* get initial response */
- if (initial = strtok (NIL,"\015\012")) {
+ if ((initial = strtok (NIL,"\015\012")) != NULL) {
if ((*initial == '=') && !initial[1]) ++initial;
else if (!*initial) initial = NIL;
}
@@ -272,7 +272,7 @@ int main (int argc,char *argv[])
else if (!strcmp (s,"RPOP"))
PSOUT ("-ERR Nice try, bunkie\015\012");
else if (!strcmp (s,"STLS")) {
- if (t = ssl_start_tls (pgmname)) {
+ if ((t = ssl_start_tls (pgmname)) != NULL) {
PSOUT ("-ERR STLS failed: ");
PSOUT (t);
CRLF;
@@ -288,7 +288,7 @@ int main (int argc,char *argv[])
/* skip leading whitespace (bogus clients!) */
while (*t == ' ') ++t;
/* remote user name? */
- if (s = strchr (t,':')) {
+ if ((s = strchr (t,':')) != NULL) {
*s++ = '\0'; /* tie off host name */
host = cpystr (t);/* copy host name */
user = cpystr (s);/* copy user name */
@@ -661,7 +661,7 @@ int pass_login (char *t,int argc,char *argv[])
pass = cpystr (t); /* copy password argument */
if (!host) { /* want remote mailbox? */
/* no, delimit user from possible admin */
- if (t = strchr (user,'*')) *t++ ='\0';
+ if ((t = strchr (user,'*')) != NULL) *t++ ='\0';
/* attempt the login */
if (server_login (user,pass,t,argc,argv)) {
int ret = mbxopen ("INBOX");
@@ -777,7 +777,7 @@ int mbxopen (char *mailbox)
goodbye = "-ERR Can't get lock. Mailbox in use\015\012";
else {
nmsgs = 0; /* no messages yet */
- if (j = stream->nmsgs) { /* if mailbox non-empty */
+ if ((j = stream->nmsgs) != 0L) { /* if mailbox non-empty */
sprintf (tmp,"1:%lu",j); /* fetch fast information for all messages */
mail_fetch_fast (stream,tmp,NIL);
}