]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/login/loginctl.c
strv: make iterator in STRV_FOREACH() declaread in the loop
[thirdparty/systemd.git] / src / login / loginctl.c
index 6af0ad2f3ccca54b82bcf4307e8f5b8127e7ad59..83f25135a2e68e1c9ef385ef748001a4ba38f456 100644 (file)
@@ -601,7 +601,6 @@ static int print_user_status_info(sd_bus *bus, const char *path, bool *new_line)
                 printf("\t   State: %s\n", i.state);
 
         if (!strv_isempty(i.sessions)) {
-                char **l;
                 printf("\tSessions:");
 
                 STRV_FOREACH(l, i.sessions)
@@ -662,7 +661,6 @@ static int print_seat_status_info(sd_bus *bus, const char *path, bool *new_line)
         printf("%s\n", strna(i.id));
 
         if (!strv_isempty(i.sessions)) {
-                char **l;
                 printf("\tSessions:");
 
                 STRV_FOREACH(l, i.sessions) {