summaryrefslogtreecommitdiff
path: root/Kernel/Net
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-07 16:22:29 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-07 16:22:29 +0200
commita01b19c878f7c6971d1ffbde039d4792e7446990 (patch)
treef2b7f21beedde7268c852ac4ddd739d131701a3f /Kernel/Net
parent8ded4ad88c1733712abf16b87f89efda00f9f93b (diff)
downloadserenity-a01b19c878f7c6971d1ffbde039d4792e7446990.zip
Kernel: Remove KBuffer::try_copy() in favor of try_create_with_bytes()
These were already equivalent, so let's only have one of them.
Diffstat (limited to 'Kernel/Net')
-rw-r--r--Kernel/Net/IPv4Socket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Net/IPv4Socket.cpp b/Kernel/Net/IPv4Socket.cpp
index bf155ed6f1..36b8750ca7 100644
--- a/Kernel/Net/IPv4Socket.cpp
+++ b/Kernel/Net/IPv4Socket.cpp
@@ -426,7 +426,7 @@ bool IPv4Socket::did_receive(const IPv4Address& source_address, u16 source_port,
dbgln("IPv4Socket({}): did_receive refusing packet since queue is full.", this);
return false;
}
- auto data_or_error = KBuffer::try_copy(packet.data(), packet.size());
+ auto data_or_error = KBuffer::try_create_with_bytes(packet);
if (data_or_error.is_error()) {
dbgln("IPv4Socket: did_receive unable to allocate storage for incoming packet.");
return false;