diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-30 08:57:01 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-30 08:57:01 +0200 |
commit | 8f45a259fc9f8180b366cbaccac1af6d368e3b3a (patch) | |
tree | 5045baec395404f39728611190925f4ce39c2ae4 /Kernel/Net/UDPSocket.cpp | |
parent | dd696e7c75c5fb630d10d0ce37e53d88fecb58a0 (diff) | |
download | serenity-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.cpp | 2 |
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); |