summaryrefslogtreecommitdiff
path: root/imap/src
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-06-08 02:42:47 -0600
committerEduardo Chappa <chappa@washington.edu>2020-06-08 02:42:47 -0600
commita340c0ecbfb80335b11bd5d5c50d130ba86b2812 (patch)
tree5edde7926ffcde8682a799c5aae481cc103f0535 /imap/src
parent6f8c0fcdeb457d11ea80cc3e04d4c4e0bbe4ed98 (diff)
downloadalpine-a340c0ecbfb80335b11bd5d5c50d130ba86b2812.tar.xz
* Remove some compilation warnings given by gcc9.
Diffstat (limited to 'imap/src')
-rw-r--r--imap/src/c-client/imap4r1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/imap/src/c-client/imap4r1.c b/imap/src/c-client/imap4r1.c
index a41973b5..2233da6e 100644
--- a/imap/src/c-client/imap4r1.c
+++ b/imap/src/c-client/imap4r1.c
@@ -3392,9 +3392,9 @@ IMAPPARSEDREPLY *imap_send_literal (MAILSTREAM *stream,char *tag,char **s,
sprintf (u, (X), (Y)); \
len = strlen(u); \
if(len < remain){ \
+ strncpy(t, u, remain); \
+ t[remain-1] = '\0'; \
remain -= len; \
- strncpy(t, u, strlen(u)); \
- t[strlen(u)] = '\0'; \
t += strlen (t); \
} \
} \
@@ -3409,7 +3409,7 @@ long imap_search_x_gm_ext1 (MAILSTREAM *stream, char *charset, SEARCHPGM *pgm, l
IMAPPARSEDREPLY *reply;
unsigned long i,j,k;
MESSAGECACHE *elt;
- size_t remain = sizeof(s) - 1, len;
+ size_t remain = sizeof(s), len;
u[0] = s[0] = '\0';
t = s;