Code

src/utils_threshold.h: Documented the public functions.
[collectd.git] / src / utils_avltree.c
index 031ec477965e61868775278f129a412f4bec1c17..285dd3853e57fe7831b63ad204ff4ca00a0b0c4a 100644 (file)
@@ -581,13 +581,12 @@ int avl_get (avl_tree_t *t, const void *key, void **value)
 {
        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);
 }