X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fsystemctl%2Fsystemctl.c;h=8fd7bc9608476381dbe826f0fd3b79f10ae6e88a;hb=ca2d37841476e6272c9957c3f5a0cbe869a531ca;hp=653a3247b414634480659e5c92a9ac6898b5025b;hpb=7cc832b91e8f5883b505c42f9f403e03dfc83c89;p=elogind.git diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 653a3247b..8fd7bc960 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",