[core] Remove redundant fd bounds check in yield_with_select_()

This commit is contained in:
J. Nick Koston
2025-11-01 16:58:17 -05:00
parent 55af818629
commit e2e20d79d0

View File

@@ -576,10 +576,9 @@ void Application::yield_with_select_(uint32_t delay_ms) {
// Update fd_set if socket list has changed
if (this->socket_fds_changed_) {
FD_ZERO(&this->base_read_fds_);
// fd bounds are already validated in register_socket_fd()
for (int fd : this->socket_fds_) {
if (fd >= 0 && fd < FD_SETSIZE) {
FD_SET(fd, &this->base_read_fds_);
}
FD_SET(fd, &this->base_read_fds_);
}
this->socket_fds_changed_ = false;
}