mirror of
https://github.com/esphome/esphome.git
synced 2026-02-21 17:05:36 -07:00
[core] Remove redundant fd bounds check in yield_with_select_()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user