chiark / gitweb /
systemctl: initialize variables
[elogind.git] / src / systemctl / systemctl.c
index 44dc47344d13c4ee2c402ccd41fda6595697832f..7a2431986dfd8b650d754e1c37f434d28927acae 100644 (file)
@@ -1204,6 +1204,7 @@ static void output_jobs_list(const struct job_info* jobs, unsigned n) {
 
         pager_open_if_enabled();
 
+        id_len = unit_len = type_len = state_len = 0;
         for (j = jobs; j < jobs + n; j++) {
                 uint32_t id = j->id;
                 assert(j->name && j->type && j->state);
@@ -2525,7 +2526,7 @@ static void print_status_info(
 
                 printf("   CGroup: %s\n", i->control_group);
 
-                if (arg_transport == BUS_TRANSPORT_LOCAL) {
+                if (arg_transport == BUS_TRANSPORT_LOCAL || arg_transport == BUS_TRANSPORT_CONTAINER) {
                         unsigned k = 0;
                         pid_t extra[2];
                         char prefix[] = "           ";