Skip to content

Commit

Permalink
smtp.c: Fixed compilation warnings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
captain-caveman2k committed Dec 12, 2014
1 parent 24b30d2 commit 6291a16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/smtp.c
Expand Up @@ -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 */
Expand All @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit 6291a16

Please sign in to comment.