mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-07-09 00:06:10 -04:00
fdm: invert check to get rid of one level of indentation
This commit is contained in:
parent
9f1525aef7
commit
777d851282
1 changed files with 14 additions and 13 deletions
5
fdm.c
5
fdm.c
|
|
@ -109,7 +109,9 @@ fdm_del_internal(struct fdm *fdm, int fd, bool close_fd)
|
|||
return true;
|
||||
|
||||
tll_foreach(fdm->fds, it) {
|
||||
if (it->item->fd == fd) {
|
||||
if (it->item->fd != fd)
|
||||
continue;
|
||||
|
||||
if (epoll_ctl(fdm->epoll_fd, EPOLL_CTL_DEL, fd, NULL) < 0)
|
||||
LOG_ERRNO("failed to unregister FD=%d from epoll", fd);
|
||||
|
||||
|
|
@ -125,7 +127,6 @@ fdm_del_internal(struct fdm *fdm, int fd, bool close_fd)
|
|||
tll_remove(fdm->fds, it);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_ERR("no such FD: %d", fd);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue