From ecfc96c9bb78ab1050fc605e409a404a27c77276 Mon Sep 17 00:00:00 2001 From: h1zzz Date: Fri, 24 Sep 2021 15:33:38 +0800 Subject: [PATCH] llist: remove redundant code, branch will not be executed Closes #7770 --- lib/llist.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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) -- 2.47.3