mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-18 05:34:02 -04:00
Convert all but 2 remaining uses of xassert(false) to BUG("...")
This commit is contained in:
parent
2f81a1d07c
commit
3c86af52c2
4 changed files with 12 additions and 17 deletions
8
fdm.c
8
fdm.c
|
|
@ -105,16 +105,12 @@ fdm_add(struct fdm *fdm, int fd, int events, fdm_handler_t handler, void *data)
|
|||
#if defined(_DEBUG)
|
||||
int flags = fcntl(fd, F_GETFL);
|
||||
if (!(flags & O_NONBLOCK)) {
|
||||
LOG_ERR("FD=%d is in blocking mode", fd);
|
||||
xassert(false);
|
||||
return false;
|
||||
BUG("FD=%d is in blocking mode", fd);
|
||||
}
|
||||
|
||||
tll_foreach(fdm->fds, it) {
|
||||
if (it->item->fd == fd) {
|
||||
LOG_ERR("FD=%d already registered", fd);
|
||||
xassert(false);
|
||||
return false;
|
||||
BUG("FD=%d already registered", fd);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue