diff options
author | Eduardo Chappa <chappa@washington.edu> | 2021-07-31 21:16:15 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2021-07-31 21:16:15 -0600 |
commit | 8167f58e118afa658590253f8696c816511c3708 (patch) | |
tree | b79d65ce860848c50449b69ae299898b71c3e322 /pith/reply.c | |
parent | bba1f63e9be0b65c090d1707a6c9168443604ed6 (diff) | |
download | alpine-8167f58e118afa658590253f8696c816511c3708.tar.xz |
* Clear more warnings given by gcc-10. Work in progress.
Diffstat (limited to 'pith/reply.c')
-rw-r--r-- | pith/reply.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pith/reply.c b/pith/reply.c index 636afa45..92172c05 100644 --- a/pith/reply.c +++ b/pith/reply.c @@ -2331,10 +2331,11 @@ forward_subject(ENVELOPE *env, int flags) removing_trailing_white_space(tmp_20k_buf); if((l = strlen(tmp_20k_buf)) < 1000 && (l < 5 || strcmp(tmp_20k_buf+l-5,"(fwd)"))){ - snprintf(tmp_20k_buf+2000, SIZEOF_20KBUF-2000, "%s (fwd)", tmp_20k_buf); - tmp_20k_buf[SIZEOF_20KBUF-2000-1] = '\0'; - memmove(tmp_20k_buf, tmp_20k_buf+2000, strlen(tmp_20k_buf+2000)); - tmp_20k_buf[strlen(tmp_20k_buf+2000)] = '\0'; + char *s = cpystr(tmp_20k_buf); + snprintf(tmp_20k_buf, SIZEOF_20KBUF, "%.1000s (fwd)", s); + tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; + strcpy(tmp_20k_buf, s); + fs_give((void **) &s); } /* |