summaryrefslogtreecommitdiff
path: root/imap/src/c-client/pop3.c
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/c-client/pop3.c
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/c-client/pop3.c')
-rw-r--r--imap/src/c-client/pop3.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/imap/src/c-client/pop3.c b/imap/src/c-client/pop3.c
index 52573f52..46c050ee 100644
--- a/imap/src/c-client/pop3.c
+++ b/imap/src/c-client/pop3.c
@@ -273,10 +273,10 @@ void pop3_lsub (MAILSTREAM *stream,char *ref,char *pat)
if (ref && *ref) sprintf (mbx,"%s%s",ref,pat);
else strcpy (mbx,pat);
- if (s = sm_read (tmp,&sdb)) do if (pop3_valid (s) && pmatch (s,mbx))
+ if ((s = sm_read (tmp,&sdb)) != NULL) do if (pop3_valid (s) && pmatch (s,mbx))
mm_lsub (stream,NIL,s,NIL);
/* until no more subscriptions */
- while (s = sm_read (tmp,&sdb));
+ while ((s = sm_read (tmp,&sdb)) != NULL);
}
@@ -428,7 +428,7 @@ MAILSTREAM *pop3_open (MAILSTREAM *stream)
if (mb.notlsflag) strcat (tmp,"/notls");
if (mb.sslflag) strcat (tmp,"/ssl");
if (mb.novalidate) strcat (tmp,"/novalidate-cert");
- if (LOCAL->loser = mb.loser) strcat (tmp,"/loser");
+ if ((LOCAL->loser = mb.loser) != 0) strcat (tmp,"/loser");
if (stream->secure) strcat (tmp,"/secure");
sprintf (tmp + strlen (tmp),"/user=\"%s\"}%s",usr,mb.mailbox);
stream->inbox = T; /* always INBOX */
@@ -498,7 +498,7 @@ long pop3_capa (MAILSTREAM *stream,long flags)
while ((t = net_getline (LOCAL->netstream)) && (t[1] || (*t != '.'))) {
if (stream->debug) mm_dlog (t);
/* get optional capability arguments */
- if (args = strchr (t,' ')) *args++ = '\0';
+ if ((args = strchr (t,' ')) != NULL) *args++ = '\0';
if (!compare_cstring (t,"STLS")) LOCAL->cap.stls = T;
else if (!compare_cstring (t,"PIPELINING")) LOCAL->cap.pipelining = T;
else if (!compare_cstring (t,"RESP-CODES")) LOCAL->cap.respcodes = T;
@@ -509,7 +509,7 @@ long pop3_capa (MAILSTREAM *stream,long flags)
LOCAL->cap.implementation = cpystr (args);
else if (!compare_cstring (t,"EXPIRE") && args) {
LOCAL->cap.expire = T; /* note that it is present */
- if (s = strchr(args,' ')){/* separate time from possible USER */
+ if ((s = strchr(args,' ')) != NULL){/* separate time from possible USER */
*s++ = '\0';
/* in case they add something after USER */
if ((strlen (s) > 4) && (s[4] == ' ')) s[4] = '\0';
@@ -520,7 +520,7 @@ long pop3_capa (MAILSTREAM *stream,long flags)
}
else if (!compare_cstring (t,"LOGIN-DELAY") && args) {
LOCAL->cap.logindelay = T;/* note that it is present */
- if (s = strchr(args,' ')){/* separate time from possible USER */
+ if ((s = strchr(args,' ')) != NULL){/* separate time from possible USER */
*s++ = '\0';
/* in case they add something after USER */
if ((strlen (s) > 4) && (s[4] == ' ')) s[4] = '\0';
@@ -841,7 +841,7 @@ char *pop3_header (MAILSTREAM *stream,unsigned long msgno,unsigned long *size,
&elt->private.msg.header.text.size);
}
/* otherwise load the cache with the message */
- else if (elt->private.msg.header.text.size = pop3_cache (stream,elt))
+ else if ((elt->private.msg.header.text.size = pop3_cache (stream,elt)) != 0L)
f = LOCAL->txt;
if (f) { /* got it, make sure at start of file */
fseek (f,(unsigned long) 0,SEEK_SET);
@@ -945,10 +945,10 @@ long pop3_expunge (MAILSTREAM *stream,char *sequence,long options)
MESSAGECACHE *elt;
unsigned long i = 1,n = 0;
long ret;
- if (ret = sequence ? ((options & EX_UID) ?
+ if ((ret = sequence ? ((options & EX_UID) ?
mail_uid_sequence (stream,sequence) :
mail_sequence (stream,sequence)) :
- LONGT) { /* build selected sequence if needed */
+ LONGT) != 0L) { /* build selected sequence if needed */
while (i <= stream->nmsgs) {
elt = mail_elt (stream,i);
if (elt->deleted && (sequence ? elt->sequence : T) &&