summaryrefslogtreecommitdiff
path: root/Userland/Utilities/keymap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Utilities/keymap.cpp')
-rw-r--r--Userland/Utilities/keymap.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Utilities/keymap.cpp b/Userland/Utilities/keymap.cpp
index 25629ad1a7..3b03cd7ede 100644
--- a/Userland/Utilities/keymap.cpp
+++ b/Userland/Utilities/keymap.cpp
@@ -65,10 +65,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
// Verify that all specified keymaps are loadable
for (auto& keymap_name : mappings_vector) {
- auto keymap = Keyboard::CharacterMap::load_from_file(keymap_name);
- if (keymap.is_error()) {
+ if (auto keymap = Keyboard::CharacterMap::load_from_file(keymap_name); keymap.is_error()) {
warnln("Cannot load keymap {}: {}({})", keymap_name, keymap.error().string_literal(), keymap.error().code());
- return keymap.error();
+ return keymap.release_error();
}
}