]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
llist: remove redundant code, branch will not be executed
authorh1zzz <root@h1zzz.net>
Fri, 24 Sep 2021 07:33:38 +0000 (15:33 +0800)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 24 Sep 2021 10:49:53 +0000 (12:49 +0200)
Closes #7770

lib/llist.c

index e0ec7393d287a6a974a6ba2b1c43ab771f4655d6..e78da7da827ff706a946b5a3758bf7d01dcff7c4 100644 (file)
@@ -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)