From 9346b9589f412215a64bd8d27e34aa18a7c36ce2 Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Wed, 29 Dec 2021 00:44:39 +0100 Subject: [PATCH] Kernel: Remove else-after-return statements in CommandLine.cpp --- Kernel/CommandLine.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Kernel/CommandLine.cpp b/Kernel/CommandLine.cpp index 651a75a8161..04f1727f62d 100644 --- a/Kernel/CommandLine.cpp +++ b/Kernel/CommandLine.cpp @@ -217,7 +217,8 @@ UNMAP_AFTER_INIT AHCIResetMode CommandLine::ahci_reset_mode() const const auto ahci_reset_mode = lookup("ahci_reset_mode"sv).value_or("controllers"sv); if (ahci_reset_mode == "controllers"sv) { return AHCIResetMode::ControllerOnly; - } else if (ahci_reset_mode == "aggressive"sv) { + } + if (ahci_reset_mode == "aggressive"sv) { return AHCIResetMode::Aggressive; } PANIC("Unknown AHCIResetMode: {}", ahci_reset_mode); @@ -233,7 +234,8 @@ PanicMode CommandLine::panic_mode(Validate should_validate) const const auto panic_mode = lookup("panic"sv).value_or("halt"sv); if (panic_mode == "halt"sv) { return PanicMode::Halt; - } else if (panic_mode == "shutdown"sv) { + } + if (panic_mode == "shutdown"sv) { return PanicMode::Shutdown; }