diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-11-30 17:51:26 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-12-01 08:09:51 +0100 |
commit | b6b535994e7d8d6ee79d5871849b95d53a64dd08 (patch) | |
tree | 66104b73cc60e190b02d0646f949d1a9da87eb99 /lib | |
parent | 2d4d012a49a058ed886ef95cd91b412a98002006 (diff) | |
download | curl-b6b535994e7d8d6ee79d5871849b95d53a64dd08.tar.gz |
splay: rename Curl_splayremovebyaddr to Curl_splayremove
... and remove the old unused proto for the old Curl_splayremove
version.
Closes #6269
Diffstat (limited to 'lib')
-rw-r--r-- | lib/multi.c | 10 | ||||
-rw-r--r-- | lib/splay.c | 6 | ||||
-rw-r--r-- | lib/splay.h | 12 |
3 files changed, 10 insertions, 18 deletions
diff --git a/lib/multi.c b/lib/multi.c index d5337e43e..adfbe3f53 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -3375,9 +3375,8 @@ 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 the splay tree first and then re-add the new value */ - rc = Curl_splayremovebyaddr(multi->timetree, - &data->state.timenode, - &multi->timetree); + rc = Curl_splayremove(multi->timetree, &data->state.timenode, + &multi->timetree); if(rc) infof(data, "Internal error removing splay node = %d\n", rc); } @@ -3423,9 +3422,8 @@ void Curl_expire_clear(struct Curl_easy *data) struct Curl_llist *list = &data->state.timeoutlist; int rc; - rc = Curl_splayremovebyaddr(multi->timetree, - &data->state.timenode, - &multi->timetree); + rc = Curl_splayremove(multi->timetree, &data->state.timenode, + &multi->timetree); if(rc) infof(data, "Internal error clearing splay node = %d\n", rc); diff --git a/lib/splay.c b/lib/splay.c index 08a721319..98baf5d87 100644 --- a/lib/splay.c +++ b/lib/splay.c @@ -206,9 +206,9 @@ struct Curl_tree *Curl_splaygetbest(struct curltime i, * * @unittest: 1309 */ -int Curl_splayremovebyaddr(struct Curl_tree *t, - struct Curl_tree *removenode, - struct Curl_tree **newroot) +int Curl_splayremove(struct Curl_tree *t, + struct Curl_tree *removenode, + struct Curl_tree **newroot) { static const struct curltime KEY_NOTUSED = { (time_t)-1, (unsigned int)-1 diff --git a/lib/splay.h b/lib/splay.h index e1a1fec88..eb9f65f1e 100644 --- a/lib/splay.h +++ b/lib/splay.h @@ -40,19 +40,13 @@ struct Curl_tree *Curl_splayinsert(struct curltime key, struct Curl_tree *t, 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 *t, struct Curl_tree **removed); -int Curl_splayremovebyaddr(struct Curl_tree *t, - struct Curl_tree *removenode, - struct Curl_tree **newroot); +int Curl_splayremove(struct Curl_tree *t, + struct Curl_tree *removenode, + struct Curl_tree **newroot); #define Curl_splaycomparekeys(i,j) ( ((i.tv_sec) < (j.tv_sec)) ? -1 : \ ( ((i.tv_sec) > (j.tv_sec)) ? 1 : \ |