mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
minor fix to make Curl_splayremove() return a NULL as "removed" in case
nothing matched fine
This commit is contained in:
parent
4a8dfb3461
commit
7cfd7f3fb1
@ -143,6 +143,8 @@ struct Curl_tree *Curl_splayremove(int i, struct Curl_tree *t,
|
||||
{
|
||||
struct Curl_tree *x;
|
||||
|
||||
*removed = NULL; /* default to no removed */
|
||||
|
||||
if (t==NULL)
|
||||
return NULL;
|
||||
|
||||
@ -174,10 +176,8 @@ struct Curl_tree *Curl_splayremove(int i, struct Curl_tree *t,
|
||||
|
||||
return x;
|
||||
}
|
||||
else {
|
||||
*removed = NULL; /* no match */
|
||||
else
|
||||
return t; /* It wasn't there */
|
||||
}
|
||||
}
|
||||
|
||||
/* Finds and deletes the best-fit node from the tree. Return a pointer to the
|
||||
|
Loading…
Reference in New Issue
Block a user