connection: Add comments explaining safety

No functional change intended.

Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
This commit is contained in:
Demi Marie Obenour 2024-07-29 15:27:10 -04:00
parent 9e9de6c9cd
commit f00586ee5f

View file

@ -1052,7 +1052,10 @@ wl_connection_demarshal(struct wl_connection *connection,
goto err;
}
/* This ring buffer will always have a multiple of sizeof(int)
* bytes in it. */
ring_buffer_copy(&connection->fds_in, &fd, sizeof fd);
/* This can wrap but that is okay. */
connection->fds_in.tail += sizeof fd;
closure->args[i].h = fd;
break;