summaryrefslogtreecommitdiff
path: root/Kernel/Net
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-09-07 03:14:00 -0700
committerAndreas Kling <kling@serenityos.org>2021-09-07 13:16:01 +0200
commitd1378339f6f4457457167fcf79cbca5f5549a336 (patch)
tree04b8fc489c6c7c3e2ebfccad5b6e872752cdced4 /Kernel/Net
parentabc523a5ab9e2aef9691e4b2b7a6f2f678ac0cf8 (diff)
downloadserenity-d1378339f6f4457457167fcf79cbca5f5549a336.zip
Kernel: Avoid string creation for simple string comparison
Diffstat (limited to 'Kernel/Net')
-rw-r--r--Kernel/Net/NetworkTask.cpp2
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 });