1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 18:25:06 +00:00

ByteBuffer: Remove pointer() in favor of data()

We had two ways to get the data inside a ByteBuffer. That was silly.
This commit is contained in:
Andreas Kling 2019-09-30 08:57:01 +02:00
parent dd696e7c75
commit 8f45a259fc
30 changed files with 89 additions and 92 deletions

View file

@ -1240,7 +1240,7 @@ int Process::sys$readlink(const char* path, char* buffer, ssize_t size)
if (!contents)
return -EIO; // FIXME: Get a more detailed error from VFS.
memcpy(buffer, contents.pointer(), min(size, (ssize_t)contents.size()));
memcpy(buffer, contents.data(), min(size, (ssize_t)contents.size()));
if (contents.size() + 1 < size)
buffer[contents.size()] = '\0';
return 0;