net, net.http: fix C.FD_ISSET declaration (#19594)

This commit is contained in:
shove 2023-10-19 16:29:13 +08:00 committed by GitHub
parent 092358fd24
commit 07390ef4c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 15 deletions

View file

@ -74,9 +74,9 @@ fn (mut pv Picoev) poll_once(max_wait int) int {
if target.loop_id == pv.loop.id {
// vfmt off
read_events := (
(if C.FD_ISSET(target.fd, &readfds) { picoev_read } else { 0 })
(if C.FD_ISSET(target.fd, &readfds) != 0 { picoev_read } else { 0 })
|
(if C.FD_ISSET(target.fd, &writefds) { picoev_write } else { 0 })
(if C.FD_ISSET(target.fd, &writefds) != 0 { picoev_write } else { 0 })
)
// vfmt on
if read_events != 0 {