mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
splay: rename Curl_splayremovebyaddr to Curl_splayremove
... and remove the old unused proto for the old Curl_splayremove version. Closes #6269
This commit is contained in:
parent
2d4d012a49
commit
b6b535994e
@ -3375,8 +3375,7 @@ void Curl_expire(struct Curl_easy *data, timediff_t milli, expire_id id)
|
|||||||
|
|
||||||
/* Since this is an updated time, we must remove the previous entry from
|
/* Since this is an updated time, we must remove the previous entry from
|
||||||
the splay tree first and then re-add the new value */
|
the splay tree first and then re-add the new value */
|
||||||
rc = Curl_splayremovebyaddr(multi->timetree,
|
rc = Curl_splayremove(multi->timetree, &data->state.timenode,
|
||||||
&data->state.timenode,
|
|
||||||
&multi->timetree);
|
&multi->timetree);
|
||||||
if(rc)
|
if(rc)
|
||||||
infof(data, "Internal error removing splay node = %d\n", rc);
|
infof(data, "Internal error removing splay node = %d\n", rc);
|
||||||
@ -3423,8 +3422,7 @@ void Curl_expire_clear(struct Curl_easy *data)
|
|||||||
struct Curl_llist *list = &data->state.timeoutlist;
|
struct Curl_llist *list = &data->state.timeoutlist;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = Curl_splayremovebyaddr(multi->timetree,
|
rc = Curl_splayremove(multi->timetree, &data->state.timenode,
|
||||||
&data->state.timenode,
|
|
||||||
&multi->timetree);
|
&multi->timetree);
|
||||||
if(rc)
|
if(rc)
|
||||||
infof(data, "Internal error clearing splay node = %d\n", rc);
|
infof(data, "Internal error clearing splay node = %d\n", rc);
|
||||||
|
@ -206,7 +206,7 @@ struct Curl_tree *Curl_splaygetbest(struct curltime i,
|
|||||||
*
|
*
|
||||||
* @unittest: 1309
|
* @unittest: 1309
|
||||||
*/
|
*/
|
||||||
int Curl_splayremovebyaddr(struct Curl_tree *t,
|
int Curl_splayremove(struct Curl_tree *t,
|
||||||
struct Curl_tree *removenode,
|
struct Curl_tree *removenode,
|
||||||
struct Curl_tree **newroot)
|
struct Curl_tree **newroot)
|
||||||
{
|
{
|
||||||
|
@ -40,17 +40,11 @@ struct Curl_tree *Curl_splayinsert(struct curltime key,
|
|||||||
struct Curl_tree *t,
|
struct Curl_tree *t,
|
||||||
struct Curl_tree *newnode);
|
struct Curl_tree *newnode);
|
||||||
|
|
||||||
#if 0
|
|
||||||
struct Curl_tree *Curl_splayremove(struct curltime key,
|
|
||||||
struct Curl_tree *t,
|
|
||||||
struct Curl_tree **removed);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct Curl_tree *Curl_splaygetbest(struct curltime key,
|
struct Curl_tree *Curl_splaygetbest(struct curltime key,
|
||||||
struct Curl_tree *t,
|
struct Curl_tree *t,
|
||||||
struct Curl_tree **removed);
|
struct Curl_tree **removed);
|
||||||
|
|
||||||
int Curl_splayremovebyaddr(struct Curl_tree *t,
|
int Curl_splayremove(struct Curl_tree *t,
|
||||||
struct Curl_tree *removenode,
|
struct Curl_tree *removenode,
|
||||||
struct Curl_tree **newroot);
|
struct Curl_tree **newroot);
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ UNITTEST_START
|
|||||||
splayprint(root, 0, 1);
|
splayprint(root, 0, 1);
|
||||||
printf("remove pointer %d, payload %zu\n", rem,
|
printf("remove pointer %d, payload %zu\n", rem,
|
||||||
*(size_t *)nodes[rem].payload);
|
*(size_t *)nodes[rem].payload);
|
||||||
rc = Curl_splayremovebyaddr(root, &nodes[rem], &root);
|
rc = Curl_splayremove(root, &nodes[rem], &root);
|
||||||
if(rc) {
|
if(rc) {
|
||||||
/* failed! */
|
/* failed! */
|
||||||
printf("remove %d failed!\n", rem);
|
printf("remove %d failed!\n", rem);
|
||||||
|
Loading…
Reference in New Issue
Block a user