diff options
author | Eduardo Chappa <chappa@washington.edu> | 2015-07-26 23:36:30 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2015-07-26 23:36:30 -0600 |
commit | 2695b63fbe6c6a2206a2637137c6cd654f69943a (patch) | |
tree | 717008efdac9ae66bf33985dc99ee68aea45bf11 /pith/send.c | |
parent | 36b77661542a63c4579943951d143c8cc9c99460 (diff) | |
download | alpine-2695b63fbe6c6a2206a2637137c6cd654f69943a.tar.xz |
* Clear even more warnings from clang 3.5 and MAC OSX.
Diffstat (limited to 'pith/send.c')
-rw-r--r-- | pith/send.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pith/send.c b/pith/send.c index 1ba6266f..017265c9 100644 --- a/pith/send.c +++ b/pith/send.c @@ -5490,10 +5490,11 @@ smtp_command(char *errbuf, size_t errbuflen) errbuf[errbuflen-1] = '\0'; #else /* UNIX */ # if defined(SENDMAIL) && defined(SENDMAILFLAGS) - char tmp[256]; - - snprintf(tmp, sizeof(tmp), "%.*s %.*s", (sizeof(tmp)-3)/2, SENDMAIL, - (sizeof(tmp)-3)/2, SENDMAILFLAGS); +#define SENDTMPLEN 256 + char tmp[SENDTMPLEN]; + /* SENDTMPLEN == sizeof(tmp) */ + snprintf(tmp, sizeof(tmp), "%.*s %.*s", (SENDTMPLEN-3)/2, SENDMAIL, + (SENDTMPLEN-3)/2, SENDMAILFLAGS); return(cpystr(tmp)); # else strncpy(errbuf, _("No default posting command."), errbuflen); @@ -5750,9 +5751,9 @@ piped_smtp_open (char *host, char *service, long unsigned int port) if(strucmp(host, "localhost")){ char tmp[MAILTMPLEN]; - + /* MAILTMPLEN = sizeof(tmp) */ snprintf(tmp, sizeof(tmp), _("Unexpected hostname for piped SMTP: %.*s"), - sizeof(tmp)-50, host); + MAILTMPLEN-50, host); tmp[sizeof(tmp)-1] = '\0'; mm_log(tmp, ERROR); } |