1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 18:07:35 +00:00

Kernel: Remove else-after-return statements in CommandLine.cpp

This commit is contained in:
Hendiadyoin1 2021-12-29 00:44:39 +01:00 committed by Andreas Kling
parent 1db53400ce
commit 9346b9589f

View file

@ -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); const auto ahci_reset_mode = lookup("ahci_reset_mode"sv).value_or("controllers"sv);
if (ahci_reset_mode == "controllers"sv) { if (ahci_reset_mode == "controllers"sv) {
return AHCIResetMode::ControllerOnly; return AHCIResetMode::ControllerOnly;
} else if (ahci_reset_mode == "aggressive"sv) { }
if (ahci_reset_mode == "aggressive"sv) {
return AHCIResetMode::Aggressive; return AHCIResetMode::Aggressive;
} }
PANIC("Unknown AHCIResetMode: {}", ahci_reset_mode); 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); const auto panic_mode = lookup("panic"sv).value_or("halt"sv);
if (panic_mode == "halt"sv) { if (panic_mode == "halt"sv) {
return PanicMode::Halt; return PanicMode::Halt;
} else if (panic_mode == "shutdown"sv) { }
if (panic_mode == "shutdown"sv) {
return PanicMode::Shutdown; return PanicMode::Shutdown;
} }