diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-05-02 17:54:52 +0900 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-05-02 10:54:52 +0200 |
commit | 76283e5fd46ca449ba4ce482e444119c8b495aa3 (patch) | |
tree | b0d2ef5d2bd493e9a4aae30be3c80de51f6fe6af /src/basic | |
parent | 9fc03455519878d54bfd8098eeb49972ade3ee29 (diff) | |
download | systemd-76283e5fd46ca449ba4ce482e444119c8b495aa3.tar.gz |
set: drop unused set_make() function (#8879)
The function causes compiler error when built with '-Ddebug=hashmap',
and is not used anymore. Let's drop it.
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/meson.build | 1 | ||||
-rw-r--r-- | src/basic/set.c | 49 | ||||
-rw-r--r-- | src/basic/set.h | 2 |
3 files changed, 0 insertions, 52 deletions
diff --git a/src/basic/meson.build b/src/basic/meson.build index 4f63fcef1c..cff1b9d18f 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build @@ -163,7 +163,6 @@ basic_sources = files(''' securebits.h selinux-util.c selinux-util.h - set.c set.h sigbus.c sigbus.h diff --git a/src/basic/set.c b/src/basic/set.c deleted file mode 100644 index 4a10c74a3a..0000000000 --- a/src/basic/set.c +++ /dev/null @@ -1,49 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - This file is part of systemd. - - Copyright 2017 Lennart Poettering -***/ - -#include "alloc-util.h" -#include "set.h" - -int set_make(Set **ret, const struct hash_ops *hash_ops HASHMAP_DEBUG_PARAMS, void *add, ...) { - _cleanup_set_free_ Set *s = NULL; - int r; - - assert(ret); - - s = set_new(hash_ops HASHMAP_DEBUG_PASS_ARGS); - if (!s) - return -ENOMEM; - - if (add) { - va_list ap; - - r = set_put(s, add); - if (r < 0) - return r; - - va_start(ap, add); - - for (;;) { - void *arg = va_arg(ap, void*); - - if (!arg) - break; - - r = set_put(s, arg); - if (r < 0) { - va_end(ap); - return r; - } - } - - va_end(ap); - } - - *ret = TAKE_PTR(s); - - return 0; -} diff --git a/src/basic/set.h b/src/basic/set.h index 6f937af929..dc0f1e17e6 100644 --- a/src/basic/set.h +++ b/src/basic/set.h @@ -136,5 +136,3 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(Set*, set_free_free); #define _cleanup_set_free_ _cleanup_(set_freep) #define _cleanup_set_free_free_ _cleanup_(set_free_freep) - -int set_make(Set **ret, const struct hash_ops *hash_ops HASHMAP_DEBUG_PARAMS, void *add, ...); |