Convert all but 2 remaining uses of xassert(false) to BUG("...")

This commit is contained in:
Craig Barnes 2021-02-10 09:01:51 +00:00
parent 2f81a1d07c
commit 3c86af52c2
4 changed files with 12 additions and 17 deletions

8
fdm.c
View file

@ -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