mirror of
https://github.com/curl/curl.git
synced 2026-08-25 13:23:33 +03:00
Curl_chunker: shrink the struct
... by removing a field, converting the hex index into a byte and rearranging the order. Cuts it down from 48 bytes to 32 on x86_64. Closes #6527
This commit is contained in:
parent
a705f28bb3
commit
5ad377718d
3 changed files with 11 additions and 15 deletions
|
|
@ -752,17 +752,15 @@ static CURLcode readwrite_data(struct Curl_easy *data,
|
|||
return CURLE_RECV_ERROR;
|
||||
}
|
||||
if(CHUNKE_STOP == res) {
|
||||
size_t dataleft;
|
||||
/* we're done reading chunks! */
|
||||
k->keepon &= ~KEEP_RECV; /* read no more */
|
||||
|
||||
/* There are now possibly N number of bytes at the end of the
|
||||
str buffer that weren't written to the client.
|
||||
Push it back to be read on the next pass. */
|
||||
|
||||
dataleft = conn->chunk.dataleft;
|
||||
if(dataleft != 0) {
|
||||
infof(data, "Leftovers after chunking: %zu bytes\n", dataleft);
|
||||
/* N number of bytes at the end of the str buffer that weren't
|
||||
written to the client. */
|
||||
if(conn->chunk.datasize) {
|
||||
infof(data, "Leftovers after chunking: % "
|
||||
CURL_FORMAT_CURL_OFF_T "u bytes\n",
|
||||
conn->chunk.datasize);
|
||||
}
|
||||
}
|
||||
/* If it returned OK, we just keep going */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue