From: Daniel Stenberg Date: Sun, 17 Nov 2024 10:48:07 +0000 (+0100) Subject: multi: add clarifying comment for wakeup_write() X-Git-Tag: curl-8_11_1~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c56dee6850fd72e4d4d29d559e8855395a591b04;p=thirdparty%2Fcurl.git multi: add clarifying comment for wakeup_write() Coverity raised it as a "suspicious sizeof". Closes #15600 --- 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