summaryrefslogtreecommitdiffstats
path: root/src/set.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/set.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/set.c b/src/set.c
index 1b8bfa5..f36ab5f 100644
--- a/src/set.c
+++ b/src/set.c
@@ -227,9 +227,11 @@ ly_set_rm(struct ly_set *set, void *object, void (*destructor)(void *obj))
return ly_set_rm_index(set, i, destructor);
}
-LY_ERR
+LIBYANG_API_DEF LY_ERR
ly_set_rm_index_ordered(struct ly_set *set, uint32_t index, void (*destructor)(void *obj))
{
+ LY_CHECK_ARG_RET(NULL, set, set->count, LY_EINVAL);
+
if (destructor) {
destructor(set->objs[index]);
}