diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-25 20:31:11 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-26 14:42:03 +0100 |
commit | 0061695507e889069c0c974cf85cd570f7ec9a88 (patch) | |
tree | 6d756e01c65a71f6e20a9e14e33a8096c87601b6 /src/basic/ordered-set.h | |
parent | dce8364918220bde8f2b520f17931451da72ffcf (diff) |
networkd: use an OrderedSet instead of Set to collect link domains
For the search domain logic the order is highly relevant, hence make sure when collecting the various search domains to
add them to an ordered set, so that the order between search domains of a specific link is retained.
Diffstat (limited to 'src/basic/ordered-set.h')
-rw-r--r-- | src/basic/ordered-set.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/basic/ordered-set.h b/src/basic/ordered-set.h index da10e90ff2..ab185c11aa 100644 --- a/src/basic/ordered-set.h +++ b/src/basic/ordered-set.h @@ -62,9 +62,15 @@ static inline bool ordered_set_iterate(OrderedSet *s, Iterator *i, void **value) return ordered_hashmap_iterate((OrderedHashmap*) s, i, value, NULL); } +int ordered_set_consume(OrderedSet *s, void *p); +int ordered_set_put_strdup(OrderedSet *s, const char *p); +int ordered_set_put_strdupv(OrderedSet *s, char **l); + #define ORDERED_SET_FOREACH(e, s, i) \ for ((i) = ITERATOR_FIRST; ordered_set_iterate((s), &(i), (void**)&(e)); ) DEFINE_TRIVIAL_CLEANUP_FUNC(OrderedSet*, ordered_set_free); +DEFINE_TRIVIAL_CLEANUP_FUNC(OrderedSet*, ordered_set_free_free); #define _cleanup_ordered_set_free_ _cleanup_(ordered_set_freep) +#define _cleanup_ordered_set_free_free_ _cleanup_(ordered_set_free_freep) |