diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-09-07 03:14:00 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-07 13:16:01 +0200 |
commit | d1378339f6f4457457167fcf79cbca5f5549a336 (patch) | |
tree | 04b8fc489c6c7c3e2ebfccad5b6e872752cdced4 /Kernel/Net | |
parent | abc523a5ab9e2aef9691e4b2b7a6f2f678ac0cf8 (diff) | |
download | serenity-d1378339f6f4457457167fcf79cbca5f5549a336.zip |
Kernel: Avoid string creation for simple string comparison
Diffstat (limited to 'Kernel/Net')
-rw-r--r-- | Kernel/Net/NetworkTask.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Net/NetworkTask.cpp b/Kernel/Net/NetworkTask.cpp index 0d530d0b45..42b68f72de 100644 --- a/Kernel/Net/NetworkTask.cpp +++ b/Kernel/Net/NetworkTask.cpp @@ -61,7 +61,7 @@ void NetworkTask_main(void*) NetworkingManagement::the().for_each([&](auto& adapter) { dmesgln("NetworkTask: {} network adapter found: hw={}", adapter.class_name(), adapter.mac_address().to_string()); - if (String(adapter.class_name()) == "LoopbackAdapter") { + if (adapter.class_name() == "LoopbackAdapter"sv) { adapter.set_ipv4_address({ 127, 0, 0, 1 }); adapter.set_ipv4_netmask({ 255, 0, 0, 0 }); adapter.set_ipv4_gateway({ 0, 0, 0, 0 }); |