summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-21 21:29:00 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-05-04 14:22:58 +0200
commit431733b866f184527649996193874885ac059b70 (patch)
tree95fbd0b4660507e808cc3eb73863da82404577c4
parent7e92ab4eb83bab01594867424161d1e9397a5ce2 (diff)
downloadsystemd-431733b866f184527649996193874885ac059b70.tar.gz
core: minor simplification
-rw-r--r--src/core/main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 2f36d752bc..12948ca964 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -2549,18 +2549,16 @@ static void setup_console_terminal(bool skip_setup) {
static bool early_skip_setup_check(int argc, char *argv[]) {
bool found_deserialize = false;
- int i;
/* Determine if this is a reexecution or normal bootup. We do the full command line parsing much later, so
* let's just have a quick peek here. Note that if we have switched root, do all the special setup things
* anyway, even if in that case we also do deserialization. */
- for (i = 1; i < argc; i++) {
+ for (int i = 1; i < argc; i++)
if (streq(argv[i], "--switched-root"))
return false; /* If we switched root, don't skip the setup. */
else if (streq(argv[i], "--deserialize"))
found_deserialize = true;
- }
return found_deserialize; /* When we are deserializing, then we are reexecuting, hence avoid the extensive setup */
}