]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/systemctl/systemctl-list-jobs.c
Merge pull request #18596 from keszybz/systemctl-quiet-legend
[thirdparty/systemd.git] / src / systemctl / systemctl-list-jobs.c
index 62d99671a5504bd4fe5a0433eb672847a07c3ee2..7ac049638202e9bd68d3d3047fd171328dbeddf1 100644 (file)
@@ -58,7 +58,6 @@ struct job_info {
 
 static int output_jobs_list(sd_bus *bus, const struct job_info* jobs, unsigned n, bool skipped) {
         _cleanup_(table_unrefp) Table *table = NULL;
-        const struct job_info *j;
         const char *on, *off;
         int r;
 
@@ -86,7 +85,7 @@ static int output_jobs_list(sd_bus *bus, const struct job_info* jobs, unsigned n
 
         (void) table_set_empty_string(table, "-");
 
-        for (j = jobs; j < jobs + n; j++) {
+        for (const struct job_info *j = jobs; j < jobs + n; j++) {
                 if (streq(j->state, "running"))
                         on = ansi_highlight();
                 else