connection: Document correct use of atoi()

atoi() has undefined behavior on invalid input, but here the input comes
from wayland-scanner, which is trusted.

Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
This commit is contained in:
Demi Marie Obenour 2024-07-29 15:27:26 -04:00
parent ac630dd3b4
commit 2bd88ca4bf

View file

@ -795,6 +795,7 @@ wl_message_get_since(const struct wl_message *message)
{
int since;
/* This is trusted input */
since = atoi(message->signature);
if (since == 0)