aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-05-24 16:11:31 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-05-24 16:11:31 +0000
commit7cfd7f3fb1189fb88cdc2121e3cc5915abdd259c (patch)
tree1ba457aeebefcb0db7a0fbd42a8ddb74589e6515
parent4a8dfb34613732b81f0e4dd7fbaac5df39e395f2 (diff)
minor fix to make Curl_splayremove() return a NULL as "removed" in case
nothing matched fine
-rw-r--r--lib/splay.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/splay.c b/lib/splay.c
index 0ea078b6c..6278089d1 100644
--- a/lib/splay.c
+++ b/lib/splay.c
@@ -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