summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/tdelete.c
diff options
context:
space:
mode:
authorRobert Drehmel <robert@FreeBSD.org>2002-08-14 21:16:41 +0000
committerRobert Drehmel <robert@FreeBSD.org>2002-08-14 21:16:41 +0000
commit840b798c83238d9477451fc3f3af180ca6249e59 (patch)
tree983842569d2950080f5fc9748d651225ee9b21b4 /lib/libc/stdlib/tdelete.c
parent33f9b60eeea647ad7d895fdfb10f309969c37b6b (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/tdelete.c')
-rw-r--r--lib/libc/stdlib/tdelete.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/libc/stdlib/tdelete.c b/lib/libc/stdlib/tdelete.c
index 32dc298c6ea6..5729bd5aa33e 100644
--- a/lib/libc/stdlib/tdelete.c
+++ b/lib/libc/stdlib/tdelete.c
@@ -25,16 +25,20 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
-/* delete node with given key */
+/*
+ * delete node with given key
+ *
+ * vkey: key to be deleted
+ * vrootp: address of the root of the tree
+ * compar: function to carry out node comparisons
+ */
void *
-tdelete(vkey, vrootp, compar)
- const void *vkey; /* key to be deleted */
- void **vrootp; /* address of the root of tree */
- int (*compar)(const void *, const void *);
+tdelete(const void *__restrict vkey, void **__restrict vrootp,
+ int (*compar)(const void *, const void *))
{
node_t **rootp = (node_t **)vrootp;
node_t *p, *q, *r;
- int cmp;
+ int cmp;
if (rootp == NULL || (p = *rootp) == NULL)
return NULL;