1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

Kernel: Convert KBuffer::copy() => KBuffer::try_copy()

This was a weird KBuffer API that assumed failure was impossible.
This patch converts it to a modern KResultOr<NonnullOwnPtr<KBuffer>> API
and updates the two clients to the new style.
This commit is contained in:
Andreas Kling 2021-09-07 15:36:39 +02:00
parent 250b52d6e5
commit b300f9aa2f
5 changed files with 49 additions and 28 deletions

View file

@ -110,7 +110,7 @@ private:
IPv4Address peer_address;
u16 peer_port;
Time timestamp;
Optional<KBuffer> data;
OwnPtr<KBuffer> data;
};
SinglyLinkedListWithCount<ReceivedPacket> m_receive_queue;