multi: add clarifying comment for wakeup_write()

Coverity raised it as a "suspicious sizeof".

Closes #15600
This commit is contained in:
Daniel Stenberg 2024-11-17 11:48:07 +01:00
parent 4b07b7ebad
commit c56dee6850
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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