mirror of
https://github.com/curl/curl.git
synced 2026-08-25 11:33:33 +03:00
llist: add Curl_llist_append()
- use for better readability in all places where the "insert_next" actually performs an append to the list - add some tests in unit1300 Closes #13336
This commit is contained in:
parent
8cee4c9238
commit
c296abd42d
11 changed files with 79 additions and 20 deletions
|
|
@ -264,8 +264,7 @@ static CURLcode unfold_value(struct Curl_easy *data, const char *value,
|
|||
newhs->value[olen + vlen] = 0; /* null-terminate at newline */
|
||||
|
||||
/* insert this node into the list of headers */
|
||||
Curl_llist_insert_next(&data->state.httphdrs, data->state.httphdrs.tail,
|
||||
newhs, &newhs->node);
|
||||
Curl_llist_append(&data->state.httphdrs, newhs, &newhs->node);
|
||||
data->state.prevhead = newhs;
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
|
@ -328,8 +327,7 @@ CURLcode Curl_headers_push(struct Curl_easy *data, const char *header,
|
|||
hs->request = data->state.requests;
|
||||
|
||||
/* insert this node into the list of headers */
|
||||
Curl_llist_insert_next(&data->state.httphdrs, data->state.httphdrs.tail,
|
||||
hs, &hs->node);
|
||||
Curl_llist_append(&data->state.httphdrs, hs, &hs->node);
|
||||
data->state.prevhead = hs;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue