]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multi: add clarifying comment for wakeup_write()
authorDaniel Stenberg <daniel@haxx.se>
Sun, 17 Nov 2024 10:48:07 +0000 (11:48 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 17 Nov 2024 15:50:58 +0000 (16:50 +0100)
Coverity raised it as a "suspicious sizeof".

Closes #15600

lib/multi.c

index 263b396d3df2df539a11b74439527f9ca9fffa3c..49fddc47203878cbadc6f92c2f5f9b234cf510a2 100644 (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