set CHANGE do not print error message for invalid arguments in freeing functions
Just silently return from the function.
diff --git a/src/set.c b/src/set.c
index 7e567eb..9769145 100644
--- a/src/set.c
+++ b/src/set.c
@@ -30,7 +30,9 @@
{
unsigned int u;
- LY_CHECK_ARG_RET(NULL, set,);
+ if (!set) {
+ return;
+ }
if (destructor) {
for (u = 0; u < set->count; ++u) {
@@ -43,7 +45,9 @@
API void
ly_set_erase(struct ly_set *set, void (*destructor)(void *obj))
{
- LY_CHECK_ARG_RET(NULL, set,);
+ if (!set) {
+ return;
+ }
ly_set_clean(set, destructor);
@@ -55,7 +59,9 @@
API void
ly_set_free(struct ly_set *set, void (*destructor)(void *obj))
{
- LY_CHECK_ARG_RET(NULL, set,);
+ if (!set) {
+ return;
+ }
ly_set_erase(set, destructor);