[Privoxy-commits] [privoxy] 01/19: enforce_header_order(): Save a couple of memory allocations

User Git git at git.privoxy.org
Sun Jan 10 15:50:40 UTC 2021


This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository privoxy.

commit cd8a0ec15ccf7841cb26c478596e9674f3283443
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Mon Jan 4 23:27:04 2021 +0100

    enforce_header_order(): Save a couple of memory allocations
---
 parsers.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Privoxy-commits mailing list