summaryrefslogtreecommitdiff
path: root/imap/src/osdep/unix/tenex.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap/src/osdep/unix/tenex.c')
-rw-r--r--imap/src/osdep/unix/tenex.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/imap/src/osdep/unix/tenex.c b/imap/src/osdep/unix/tenex.c
index eee61fba..8815fee1 100644
--- a/imap/src/osdep/unix/tenex.c
+++ b/imap/src/osdep/unix/tenex.c
@@ -294,10 +294,13 @@ long tenex_rename (MAILSTREAM *stream,char *old,char *newname)
if (!tenex_file (file,old) ||
(newname && (!((s = mailboxfile (tmp,newname)) && *s) ||
((s = strrchr (tmp,'/')) && !s[1])))) {
- sprintf (tmp,newname ?
- "Can't rename mailbox %.80s to %.80s: invalid name" :
- "Can't delete mailbox %.80s: invalid name",
+ if(newname)
+ sprintf (tmp,
+ "Can't rename mailbox %.80s to %.80s: invalid name",
old,newname);
+ else
+ sprintf (tmp,
+ "Can't delete mailbox %.80s: invalid name", old);
MM_LOG (tmp,ERROR);
return NIL;
}
@@ -321,7 +324,7 @@ long tenex_rename (MAILSTREAM *stream,char *old,char *newname)
}
if (newname) { /* want rename? */
- if (s = strrchr (tmp,'/')) {/* found superior to destination name? */
+ if ((s = strrchr (tmp,'/')) != NULL) {/* found superior to destination name? */
c = *++s; /* remember first character of inferior */
*s = '\0'; /* tie off to get just superior */
/* name doesn't exist, create it */
@@ -769,7 +772,7 @@ void tenex_snarf (MAILSTREAM *stream)
hdr = cpystr (mail_fetchheader_full(sysibx,i,NIL,&hdrlen,FT_INTERNAL));
txt = mail_fetchtext_full (sysibx,i,&txtlen,FT_INTERNAL|FT_PEEK);
/* if have a message */
- if (j = hdrlen + txtlen) {
+ if ((j = hdrlen + txtlen) != 0L) {
/* calculate header line */
mail_date (LOCAL->buf,elt = mail_elt (sysibx,i));
sprintf (LOCAL->buf + strlen (LOCAL->buf),