From: Fabian Keil Date: Mon, 4 Jan 2021 22:27:04 +0000 (+0100) Subject: enforce_header_order(): Save a couple of memory allocations X-Git-Tag: v_3_0_30~146 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=cd8a0ec15ccf7841cb26c478596e9674f3283443;ds=sidebyside enforce_header_order(): Save a couple of memory allocations --- diff --git a/parsers.c b/parsers.c index ba151d15..de1eea48 100644 --- a/parsers.c +++ b/parsers.c @@ -1211,8 +1211,8 @@ static void enforce_header_order(struct list *headers, const struct list *ordere } list_remove_all(headers); - list_duplicate(headers, new_headers); - list_remove_all(new_headers); + headers->first = new_headers->first; + headers->last = new_headers->last; return; }