From c56dee6850fd72e4d4d29d559e8855395a591b04 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 17 Nov 2024 11:48:07 +0100 Subject: [PATCH] multi: add clarifying comment for wakeup_write() Coverity raised it as a "suspicious sizeof". Closes #15600 --- lib/multi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/multi.c b/lib/multi.c index 263b396d3d..49fddc4720 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -1541,6 +1541,9 @@ CURLMcode curl_multi_wakeup(CURLM *m) if(multi->wakeup_pair[1] != CURL_SOCKET_BAD) { #ifdef USE_EVENTFD buf = &val; + /* eventfd has a stringent rule of requiring the 8-byte buffer when + calling write(2) on it, which makes the sizeof(buf) below fine since + this is only used on 64-bit systems and then the pointer is 64-bit */ #else buf[0] = 1; #endif