From: h1zzz Date: Fri, 24 Sep 2021 07:33:38 +0000 (+0800) Subject: llist: remove redundant code, branch will not be executed X-Git-Tag: curl-7_80_0~188 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ecfc96c9bb78ab1050fc605e409a404a27c77276;p=thirdparty%2Fcurl.git llist: remove redundant code, branch will not be executed Closes #7770 --- diff --git a/lib/llist.c b/lib/llist.c index e0ec7393d2..e78da7da82 100644 --- a/lib/llist.c +++ b/lib/llist.c @@ -106,9 +106,7 @@ Curl_llist_remove(struct Curl_llist *list, struct Curl_llist_element *e, e->next->prev = NULL; } else { - if(!e->prev) - list->head = e->next; - else + if(e->prev) e->prev->next = e->next; if(!e->next)