mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:13:38 +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
|
|
@ -92,7 +92,6 @@ void Curl_httpchunk_init(struct Curl_easy *data)
|
|||
struct connectdata *conn = data->conn;
|
||||
struct Curl_chunker *chunk = &conn->chunk;
|
||||
chunk->hexindex = 0; /* start at 0 */
|
||||
chunk->dataleft = 0; /* no data left yet! */
|
||||
chunk->state = CHUNK_HEX; /* we get hex first! */
|
||||
Curl_dyn_init(&conn->trailer, DYN_H1_TRAILER);
|
||||
}
|
||||
|
|
@ -309,7 +308,7 @@ CHUNKcode Curl_httpchunk_read(struct Curl_easy *data,
|
|||
|
||||
/* Record the length of any data left in the end of the buffer
|
||||
even if there's no more chunks to read */
|
||||
ch->dataleft = curlx_sotouz(length);
|
||||
ch->datasize = curlx_sotouz(length);
|
||||
|
||||
return CHUNKE_STOP; /* return stop */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue