diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-09 23:12:07 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-09 23:12:07 +0200 |
commit | 525d3cc746a037e8cc6b2e0ebaaf76a51856fa6b (patch) | |
tree | c96ffcfb5a7bf46fdbbd4ea6bf801bc3b3cf7acd /src/resolve | |
parent | 6796073e330f49923c5134652ee085e29fc88002 (diff) | |
download | systemd-525d3cc746a037e8cc6b2e0ebaaf76a51856fa6b.tar.gz systemd-525d3cc746a037e8cc6b2e0ebaaf76a51856fa6b.tar.bz2 systemd-525d3cc746a037e8cc6b2e0ebaaf76a51856fa6b.zip |
tree-wide: take benefit of the fact that hashmap_free() returns NULL
And set_free() too.
Another Coccinelle patch.
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/resolved-dns-zone.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/resolve/resolved-dns-zone.c b/src/resolve/resolved-dns-zone.c index 674bb6af28..8a59bd1c3c 100644 --- a/src/resolve/resolved-dns-zone.c +++ b/src/resolve/resolved-dns-zone.c @@ -90,11 +90,8 @@ void dns_zone_flush(DnsZone *z) { assert(hashmap_size(z->by_key) == 0); assert(hashmap_size(z->by_name) == 0); - hashmap_free(z->by_key); - z->by_key = NULL; - - hashmap_free(z->by_name); - z->by_name = NULL; + z->by_key = hashmap_free(z->by_key); + z->by_name = hashmap_free(z->by_name); } static DnsZoneItem* dns_zone_get(DnsZone *z, DnsResourceRecord *rr) { |