~ubuntu-branches/ubuntu/trusty/systemd/trusty

« back to all changes in this revision

Viewing changes to src/shared/set.c

Tags: upstream-202
ImportĀ upstreamĀ versionĀ 202

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
        hashmap_free(MAKE_HASHMAP(s));
38
38
}
39
39
 
40
 
void set_freep(Set **s) {
41
 
        if (!s)
42
 
                return;
43
 
 
44
 
        set_free(*s);
45
 
        *s = NULL;
46
 
}
47
 
 
48
40
void set_free_free(Set *s) {
49
41
        hashmap_free_free(MAKE_HASHMAP(s));
50
42
}
51
43
 
52
 
void set_free_freep(Set **s) {
53
 
        if (!*s)
54
 
                return;
55
 
 
56
 
        set_free_free(*s);
57
 
        *s = NULL;
58
 
}
59
 
 
60
44
int set_ensure_allocated(Set **s, hash_func_t hash_func, compare_func_t compare_func) {
61
45
        return hashmap_ensure_allocated((Hashmap**) s, hash_func, compare_func);
62
46
}