diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-07-25 12:21:50 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-07-25 13:51:34 -0400 |
commit | f8654baa084e8888bc5ba11e8ef3d9784f955cff (patch) | |
tree | 2b65696cc7771e1a64db5c9bbe534c7dc574a00a /src/systemctl | |
parent | 662bea6729d4147dfdd1501f81335adf5a2a6012 (diff) |
systemctl: simplify machine_info_clear
It is only used with info allocated on the stack, so the pointer cannot be
NULL.
Diffstat (limited to 'src/systemctl')
-rw-r--r-- | src/systemctl/systemctl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index d4ec1da290..44a3708a62 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -1835,12 +1835,12 @@ static const struct bus_properties_map machine_info_property_map[] = { }; static void machine_info_clear(struct machine_info *info) { - if (info) { - free(info->name); - free(info->state); - free(info->control_group); - zero(*info); - } + assert(info); + + free(info->name); + free(info->state); + free(info->control_group); + zero(*info); } static void free_machines_list(struct machine_info *machine_infos, int n) { |