diff options
author | Eduardo Chappa <chappa@washington.edu> | 2015-07-24 22:13:59 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2015-07-24 22:13:59 -0600 |
commit | 9306e227fc7b1b096d4a58f8c06da66603a50a6a (patch) | |
tree | 0f4089b0487bb8d6514fcfb79fdd352ebcd527a9 /imap/src/osdep/unix/news.c | |
parent | 28063ac494a640111f4483e85f968ee45b4213de (diff) | |
download | alpine-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/osdep/unix/news.c')
-rw-r--r-- | imap/src/osdep/unix/news.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/imap/src/osdep/unix/news.c b/imap/src/osdep/unix/news.c index 4cf5bb70..1af24273 100644 --- a/imap/src/osdep/unix/news.c +++ b/imap/src/osdep/unix/news.c @@ -215,7 +215,7 @@ void news_list (MAILSTREAM *stream,char *ref,char *pat) if (!pat || !*pat) { /* empty pattern? */ if (news_canonicalize (ref,"*",pattern)) { /* tie off name at root */ - if (s = strchr (pattern,'.')) *++s = '\0'; + if ((s = strchr (pattern,'.')) != NULL) *++s = '\0'; else pattern[0] = '\0'; mm_list (stream,'.',pattern,LATT_NOSELECT); } @@ -231,7 +231,7 @@ void news_list (MAILSTREAM *stream,char *ref,char *pat) strcpy (name,"#news."); /* write initial prefix */ i = strlen (pattern); /* length of pattern */ if (pattern[--i] != '%') i = 0; - if (t = strtok_r (s,"\n",&r)) do if (u = strchr (t,' ')) { + if ((t = strtok_r (s,"\n",&r)) != NULL) do if ((u = strchr (t,' ')) != NULL) { *u = '\0'; /* tie off at end of name */ strcpy (name + 6,t); /* make full form of name */ if (pmatch_full (name,pattern,'.')) mm_list (stream,'.',name,NIL); @@ -240,7 +240,7 @@ void news_list (MAILSTREAM *stream,char *ref,char *pat) if (pmatch_full (name,pattern,'.')) mm_list (stream,'.',name,LATT_NOSELECT); } - } while (t = strtok_r (NIL,"\n",&r)); + } while ((t = strtok_r (NIL,"\n",&r)) != NULL); fs_give ((void **) &s); } } @@ -283,7 +283,7 @@ long news_canonicalize (char *ref,char *pat,char *pattern) if ((pattern[0] == '#') && (pattern[1] == 'n') && (pattern[2] == 'e') && (pattern[3] == 'w') && (pattern[4] == 's') && (pattern[5] == '.') && !strchr (pattern,'/')) { /* count wildcards */ - for (i = 0, s = pattern; *s; *s++) if ((*s == '*') || (*s == '%')) ++i; + for (i = 0, s = pattern; *s; s++) if ((*s == '*') || (*s == '%')) ++i; /* success if not too many */ if (i <= MAXWILDCARDS) return LONGT; MM_LOG ("Excessive wildcards in LIST/LSUB",ERROR); @@ -365,7 +365,7 @@ MAILSTREAM *news_open (MAILSTREAM *stream) /* build directory name */ sprintf (s = tmp,"%s/%s",(char *) mail_parameters (NIL,GET_NEWSSPOOL,NIL), stream->mailbox + 6); - while (s = strchr (s,'.')) *s = '/'; + while ((s = strchr (s,'.')) != NULL) *s = '/'; /* scan directory */ if ((nmsgs = scandir (tmp,&names,news_select,news_numsort)) >= 0) { mail_exists (stream,nmsgs); /* notify upper level that messages exist */ @@ -406,7 +406,7 @@ int news_select (struct direct *name) { char c; char *s = name->d_name; - while (c = *s++) if (!isdigit (c)) return NIL; + while ((c = *s++) != '\0') if (!isdigit (c)) return NIL; return T; } @@ -566,7 +566,7 @@ void news_load_message (MAILSTREAM *stream,unsigned long msgno,long flags) switch (c = SNX (&bs)) { case '\015': /* unlikely carriage return */ *t++ = c; - if ((CHR (&bs) == '\012')) *t++ = SNX (&bs); + if (CHR (&bs) == '\012') *t++ = SNX (&bs); break; case '\012': /* line feed? */ *t++ = '\015'; @@ -586,7 +586,7 @@ void news_load_message (MAILSTREAM *stream,unsigned long msgno,long flags) switch (c = SNX (&bs)) { case '\015': /* unlikely carriage return */ *t++ = c; - if ((CHR (&bs) == '\012')) *t++ = SNX (&bs); + if (CHR (&bs) == '\012') *t++ = SNX (&bs); break; case '\012': /* line feed? */ *t++ = '\015'; |