aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-12-12 22:57:31 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-12-12 23:03:46 +0000
commit6291a16b201c6908dfdc2db1e26b750877e67146 (patch)
tree8510850d67571beaa8304ed8132e9858dce52779
parent24b30d259caf2317bc38873b2f6ee20dd9682cc7 (diff)
smtp.c: Fixed compilation warnings
smtp.c:2357 warning: adding 'size_t' (aka 'unsigned long') to a string does not append to the string smtp.c:2375 warning: adding 'size_t' (aka 'unsigned long') to a string does not append to the string smtp.c:2386 warning: adding 'size_t' (aka 'unsigned long') to a string does not append to the string Used array index notation instead.
-rw-r--r--lib/smtp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/smtp.c b/lib/smtp.c
index 333565955..4016741dc 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -2354,7 +2354,7 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread)
}
else if(smtp->eob) {
/* A previous substring matched so output that first */
- memcpy(&scratch[si], SMTP_EOB + eob_sent, smtp->eob - eob_sent);
+ memcpy(&scratch[si], &SMTP_EOB[eob_sent], smtp->eob - eob_sent);
si += smtp->eob - eob_sent;
/* Then compare the first byte */
@@ -2372,7 +2372,7 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread)
/* Do we have a match for CRLF. as per RFC-5321, sect. 4.5.2 */
if(SMTP_EOB_FIND_LEN == smtp->eob) {
/* Copy the replacement data to the target buffer */
- memcpy(&scratch[si], SMTP_EOB_REPL + eob_sent,
+ memcpy(&scratch[si], &SMTP_EOB_REPL[eob_sent],
SMTP_EOB_REPL_LEN - eob_sent);
si += SMTP_EOB_REPL_LEN - eob_sent;
smtp->eob = 0;
@@ -2384,7 +2384,7 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread)
if(smtp->eob - eob_sent) {
/* A substring matched before processing ended so output that now */
- memcpy(&scratch[si], SMTP_EOB + eob_sent, smtp->eob - eob_sent);
+ memcpy(&scratch[si], &SMTP_EOB[eob_sent], smtp->eob - eob_sent);
si += smtp->eob - eob_sent;
}