summaryrefslogtreecommitdiff
path: root/src/getty-generator
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-03-23 10:48:13 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-03-23 11:50:18 +0100
commit5980d463048f25411c55da2f6387cdc8eaeef4c8 (patch)
treee5c32417015bfd67d326d278b1cd7dac3ada39de /src/getty-generator
parent5b391395822575533ab0fc93485fc5554d0da099 (diff)
downloadsystemd-5980d463048f25411c55da2f6387cdc8eaeef4c8.tar.gz
strv: declare iterator of FOREACH_STRING() in the loop
Same idea as 03677889f0ef42cdc534bf3b31265a054b20a354. No functional change intended. The type of the iterator is generally changed to be 'const char*' instead of 'char*'. Despite the type commonly used, modifying the string was not allowed. I adjusted the naming of some short variables for clarity and reduced the scope of some variable declarations in code that was being touched anyway.
Diffstat (limited to 'src/getty-generator')
-rw-r--r--src/getty-generator/getty-generator.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c
index 59bdfc496b..4e8162a319 100644
--- a/src/getty-generator/getty-generator.c
+++ b/src/getty-generator/getty-generator.c
@@ -215,9 +215,7 @@ static int run(const char *dest, const char *dest_early, const char *dest_late)
return r;
}
- /* Automatically add in a serial getty on the first
- * virtualizer console */
- const char *j;
+ /* Automatically add in a serial getty on the first virtualizer console */
FOREACH_STRING(j,
"hvc0",
"xvc0",