- Fix bitwise operators in conditional expressions with parentheses.

This commit is contained in:
W.C.A. Wijngaards
2025-06-11 15:46:31 +02:00
parent 1cc1e0b89e
commit 9f29292839
4 changed files with 14 additions and 11 deletions
+1 -1
View File
@@ -1509,7 +1509,7 @@ void dtio_output_cb(int ATTR_UNUSED(fd), short bits, void* arg)
}
#endif
if((bits&UB_EV_READ || dtio->ssl_brief_write)) {
if((bits&UB_EV_READ) || dtio->ssl_brief_write) {
#ifdef HAVE_SSL
if(dtio->ssl_brief_write)
(void)dtio_disable_brief_write(dtio);
+3
View File
@@ -1,3 +1,6 @@
11 June 2025: Wouter
- Fix bitwise operators in conditional expressions with parentheses.
5 June 2025: Wouter
- Fix unbound-anchor certificate file read for line ends and end of
file.
+2 -2
View File
@@ -297,10 +297,10 @@ int event_add(struct event* ev, struct timeval* tv)
return -1;
if( (ev->ev_events&(EV_READ|EV_WRITE)) && ev->ev_fd != -1) {
ev->ev_base->fds[ev->ev_fd] = ev;
if(ev->ev_events&EV_READ) {
if((ev->ev_events&EV_READ)) {
FD_SET(FD_SET_T ev->ev_fd, &ev->ev_base->reads);
}
if(ev->ev_events&EV_WRITE) {
if((ev->ev_events&EV_WRITE)) {
FD_SET(FD_SET_T ev->ev_fd, &ev->ev_base->writes);
}
FD_SET(FD_SET_T ev->ev_fd, &ev->ev_base->content);
+8 -8
View File
@@ -4630,7 +4630,7 @@ comm_point_tcp_handle_callback(int fd, short event, void* arg)
}
#endif
if(event&UB_EV_TIMEOUT) {
if((event&UB_EV_TIMEOUT)) {
verbose(VERB_QUERY, "tcp took too long, dropped");
reclaim_tcp_handler(c);
if(!c->tcp_do_close) {
@@ -4640,7 +4640,7 @@ comm_point_tcp_handle_callback(int fd, short event, void* arg)
}
return;
}
if(event&UB_EV_READ
if((event&UB_EV_READ)
#ifdef USE_MSG_FASTOPEN
&& !(c->tcp_do_fastopen && (event&UB_EV_WRITE))
#endif
@@ -4665,7 +4665,7 @@ comm_point_tcp_handle_callback(int fd, short event, void* arg)
tcp_more_read_again(fd, c);
return;
}
if(event&UB_EV_WRITE) {
if((event&UB_EV_WRITE)) {
int has_tcpq = (c->tcp_req_info != NULL);
int* morewrite = c->tcp_more_write_again;
if(!comm_point_tcp_handle_write(fd, c)) {
@@ -5648,7 +5648,7 @@ comm_point_http_handle_callback(int fd, short event, void* arg)
log_assert(c->type == comm_http);
ub_comm_base_now(c->ev->base);
if(event&UB_EV_TIMEOUT) {
if((event&UB_EV_TIMEOUT)) {
verbose(VERB_QUERY, "http took too long, dropped");
reclaim_http_handler(c);
if(!c->tcp_do_close) {
@@ -5658,7 +5658,7 @@ comm_point_http_handle_callback(int fd, short event, void* arg)
}
return;
}
if(event&UB_EV_READ) {
if((event&UB_EV_READ)) {
if(!comm_point_http_handle_read(fd, c)) {
reclaim_http_handler(c);
if(!c->tcp_do_close) {
@@ -5670,7 +5670,7 @@ comm_point_http_handle_callback(int fd, short event, void* arg)
}
return;
}
if(event&UB_EV_WRITE) {
if((event&UB_EV_WRITE)) {
if(!comm_point_http_handle_write(fd, c)) {
reclaim_http_handler(c);
if(!c->tcp_do_close) {
@@ -5691,7 +5691,7 @@ void comm_point_local_handle_callback(int fd, short event, void* arg)
log_assert(c->type == comm_local);
ub_comm_base_now(c->ev->base);
if(event&UB_EV_READ) {
if((event&UB_EV_READ)) {
if(!comm_point_tcp_handle_read(fd, c, 1)) {
fptr_ok(fptr_whitelist_comm_point(c->callback));
(void)(*c->callback)(c, c->cb_arg, NETEVENT_CLOSED,
@@ -5710,7 +5710,7 @@ void comm_point_raw_handle_callback(int ATTR_UNUSED(fd),
log_assert(c->type == comm_raw);
ub_comm_base_now(c->ev->base);
if(event&UB_EV_TIMEOUT)
if((event&UB_EV_TIMEOUT))
err = NETEVENT_TIMEOUT;
fptr_ok(fptr_whitelist_comm_point_raw(c->callback));
(void)(*c->callback)(c, c->cb_arg, err, NULL);