mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
LibIPC: Give MessageBuffer::fds some inline capacity (1)
This dodges a heap allocation when sending 0 or 1 fd across the IPC boundary (which covers every message.)
This commit is contained in:
parent
8608cd11e4
commit
86a3ef2709
2 changed files with 3 additions and 3 deletions
|
@ -41,7 +41,7 @@ void ConnectionBase::post_message(MessageBuffer buffer)
|
|||
|
||||
#ifdef __serenity__
|
||||
for (auto& fd : buffer.fds) {
|
||||
auto rc = sendfd(m_socket->fd(), fd->value());
|
||||
auto rc = sendfd(m_socket->fd(), fd.value());
|
||||
if (rc < 0) {
|
||||
perror("sendfd");
|
||||
shutdown();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue