]> git.proxmox.com Git - systemd.git/blobdiff - src/systemctl/systemctl-list-unit-files.c
New upstream version 249~rc1
[systemd.git] / src / systemctl / systemctl-list-unit-files.c
index 1bf2fc18f3f0ed0cdfc88dea041e6cbd1fc25b56..fd10e7965b48d8f776cefa025a7049d8a66acfe6 100644 (file)
@@ -136,7 +136,6 @@ static int output_unit_file_list(const UnitFileList *units, unsigned c) {
 int list_unit_files(int argc, char *argv[], void *userdata) {
         _cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
         _cleanup_free_ UnitFileList *units = NULL;
-        size_t size = 0;
         unsigned c = 0;
         const char *state;
         char *path;
@@ -234,7 +233,7 @@ int list_unit_files(int argc, char *argv[], void *userdata) {
 
                 while ((r = sd_bus_message_read(reply, "(ss)", &path, &state)) > 0) {
 
-                        if (!GREEDY_REALLOC(units, size, c + 1))
+                        if (!GREEDY_REALLOC(units, c + 1))
                                 return log_oom();
 
                         units[c] = (struct UnitFileList) {