chiark / gitweb /
shared: remove pointless checks in auto-cleanup functions
[elogind.git] / src / shared / set.c
index 53399b655b43daafe615489cdbadac8e9dfe17e9..111d53bb36e6bd95d50348ddd03ed02e24d44a01 100644 (file)
@@ -38,17 +38,17 @@ void set_free(Set* s) {
 }
 
 void set_freep(Set **s) {
-        if (!s)
-                return;
-
         set_free(*s);
-        *s = NULL;
 }
 
 void set_free_free(Set *s) {
         hashmap_free_free(MAKE_HASHMAP(s));
 }
 
+void set_free_freep(Set **s) {
+        set_free_free(*s);
+}
+
 int set_ensure_allocated(Set **s, hash_func_t hash_func, compare_func_t compare_func) {
         return hashmap_ensure_allocated((Hashmap**) s, hash_func, compare_func);
 }