summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 653a3247b4..8fd7bc9608 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -515,7 +515,7 @@ static int get_unit_list(
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
- size_t size;
+ size_t size = c;
int r;
UnitInfo u;
@@ -523,8 +523,6 @@ static int get_unit_list(
assert(unit_infos);
assert(_reply);
- size = sizeof(UnitInfo) * c;
-
r = sd_bus_call_method(
bus,
"org.freedesktop.systemd1",