From: Daniel Stenberg Date: Sat, 21 Dec 2013 23:29:43 +0000 (+0100) Subject: Curl_pp_readresp: replace stupid loop with memcpy X-Git-Tag: curl-7_35_0~205 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1deac31eba7;p=curl Curl_pp_readresp: replace stupid loop with memcpy --- diff --git a/lib/pingpong.c b/lib/pingpong.c index 1b2ccd9b5..eca385e48 100644 --- a/lib/pingpong.c +++ b/lib/pingpong.c @@ -376,10 +376,8 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, if(pp->endofresp(conn, pp->linestart_resp, perline, code)) { /* This is the end of the last line, copy the last line to the start of the buffer and zero terminate, for old times sake */ - char *meow; - int n; - for(meow=pp->linestart_resp, n=0; meowlinestart_resp; + memcpy(buf, pp->linestart_resp, n); buf[n]=0; /* zero terminate */ keepon=FALSE; pp->linestart_resp = ptr+1; /* advance pointer */