diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2020-03-04 06:31:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-03-04 19:34:23 (GMT) |
commit | 735ea3001ae98636a4cb7caf15a40960c0da39a1 (patch) | |
tree | dc511f0892ccd186358795757e9abb23aa567e1d /lib/llist.c | |
parent | b26487c663ec29d972fd61adc2b14ac5880b78c7 (diff) | |
download | CMake-735ea3001ae98636a4cb7caf15a40960c0da39a1.zip CMake-735ea3001ae98636a4cb7caf15a40960c0da39a1.tar.gz CMake-735ea3001ae98636a4cb7caf15a40960c0da39a1.tar.bz2 |
curl 2020-03-04 (b8d13668)
Code extracted from:
https://github.com/curl/curl.git
at commit b8d1366852fd0034374c5de1e4968c7a224f77cc (curl-7_69_0).
Diffstat (limited to 'lib/llist.c')
-rw-r--r-- | lib/llist.c | 53 |
1 files changed, 1 insertions, 52 deletions
diff --git a/lib/llist.c b/lib/llist.c index f8769c2..e7c6f51 100644 --- a/lib/llist.c +++ b/lib/llist.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -144,54 +144,3 @@ Curl_llist_count(struct curl_llist *list) { return list->size; } - -/* - * @unittest: 1300 - */ -void Curl_llist_move(struct curl_llist *list, struct curl_llist_element *e, - struct curl_llist *to_list, - struct curl_llist_element *to_e) -{ - /* Remove element from list */ - if(e == NULL || list->size == 0) - return; - - if(e == list->head) { - list->head = e->next; - - if(list->head == NULL) - list->tail = NULL; - else - e->next->prev = NULL; - } - else { - e->prev->next = e->next; - if(!e->next) - list->tail = e->prev; - else - e->next->prev = e->prev; - } - - --list->size; - - /* Add element to to_list after to_e */ - if(to_list->size == 0) { - to_list->head = e; - to_list->head->prev = NULL; - to_list->head->next = NULL; - to_list->tail = e; - } - else { - e->next = to_e->next; - e->prev = to_e; - if(to_e->next) { - to_e->next->prev = e; - } - else { - to_list->tail = e; - } - to_e->next = e; - } - - ++to_list->size; -} |