summaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-01-25 17:42:59 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-01-27 08:48:08 +0100
commit5ad377718d0c585ec3e534d68fcfcc5abb74e1b1 (patch)
tree669d541ae757d9895b5731bdcbabf7b89fe19d35 /lib/transfer.c
parenta705f28bb31a6428421b35741115144f073a3826 (diff)
downloadcurl-5ad377718d0c585ec3e534d68fcfcc5abb74e1b1.tar.gz
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
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index bd89bf8dd..f9cdcd1d8 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -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 */