summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 65cbd6c)
raw | patch | inline | side by side (parent: 65cbd6c)
author | Luke Heberling <collectd@c-ware.com> | |
Thu, 13 Dec 2007 07:09:16 +0000 (08:09 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Thu, 13 Dec 2007 07:09:16 +0000 (08:09 +0100) |
The documentation in the header file for avl_get states that value may be null,
but the code in the source file asserts otherwise. This patch changes the code
to reflect the documentation.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
but the code in the source file asserts otherwise. This patch changes the code
to reflect the documentation.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/utils_avltree.c | patch | blob | history |
diff --git a/src/utils_avltree.c b/src/utils_avltree.c
index 09cf2e6fee238f246780d5b191d22bb54f6c6f14..11d3d716c92bd259d712a5920ced0ffa1cd79c62 100644 (file)
--- a/src/utils_avltree.c
+++ b/src/utils_avltree.c
{
avl_node_t *n;
- assert (value != NULL);
-
n = search (t, key);
if (n == NULL)
return (-1);
- *value = n->value;
+ if (value != NULL)
+ *value = n->value;
return (0);
}