From 525d3cc746a037e8cc6b2e0ebaaf76a51856fa6b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 9 Sep 2015 23:12:07 +0200 Subject: tree-wide: take benefit of the fact that hashmap_free() returns NULL And set_free() too. Another Coccinelle patch. --- src/core/unit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/unit.c') diff --git a/src/core/unit.c b/src/core/unit.c index 563d7bf254..e40ea24be8 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -673,8 +673,7 @@ static void merge_dependencies(Unit *u, Unit *other, const char *other_id, UnitD /* The move cannot fail. The caller must have performed a reservation. */ assert_se(complete_move(&u->dependencies[d], &other->dependencies[d]) == 0); - set_free(other->dependencies[d]); - other->dependencies[d] = NULL; + other->dependencies[d] = set_free(other->dependencies[d]); } int unit_merge(Unit *u, Unit *other) { -- cgit v1.2.3-54-g00ecf