+/* SPDX-License-Identifier: LGPL-2.1+ */
/***
This file is part of systemd.
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "alloc-util.h"
#include "set.h"
int set_make(Set **ret, const struct hash_ops *hash_ops HASHMAP_DEBUG_PARAMS, void *add, ...) {
va_start(ap, add);
- for(;;) {
+ for (;;) {
void *arg = va_arg(ap, void*);
if (!arg)
va_end(ap);
}
- *ret = s;
- s = NULL;
+ *ret = TAKE_PTR(s);
return 0;
}