summaryrefslogtreecommitdiff
path: root/Kernel/Net/UDPSocket.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-30 08:57:01 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-30 08:57:01 +0200
commit8f45a259fc9f8180b366cbaccac1af6d368e3b3a (patch)
tree5045baec395404f39728611190925f4ce39c2ae4 /Kernel/Net/UDPSocket.cpp
parentdd696e7c75c5fb630d10d0ce37e53d88fecb58a0 (diff)
downloadserenity-8f45a259fc9f8180b366cbaccac1af6d368e3b3a.zip
ByteBuffer: Remove pointer() in favor of data()
We had two ways to get the data inside a ByteBuffer. That was silly.
Diffstat (limited to 'Kernel/Net/UDPSocket.cpp')
-rw-r--r--Kernel/Net/UDPSocket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Net/UDPSocket.cpp b/Kernel/Net/UDPSocket.cpp
index 103c824226..8d3890f6ab 100644
--- a/Kernel/Net/UDPSocket.cpp
+++ b/Kernel/Net/UDPSocket.cpp
@@ -67,7 +67,7 @@ int UDPSocket::protocol_send(const void* data, int data_length)
if (routing_decision.is_zero())
return -EHOSTUNREACH;
auto buffer = ByteBuffer::create_zeroed(sizeof(UDPPacket) + data_length);
- auto& udp_packet = *(UDPPacket*)(buffer.pointer());
+ auto& udp_packet = *(UDPPacket*)(buffer.data());
udp_packet.set_source_port(local_port());
udp_packet.set_destination_port(peer_port());
udp_packet.set_length(sizeof(UDPPacket) + data_length);