aboutsummaryrefslogtreecommitdiff
path: root/fdm.c
diff options
context:
space:
mode:
Diffstat (limited to 'fdm.c')
-rw-r--r--fdm.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fdm.c b/fdm.c
index 3394f10c..34d0fbff 100644
--- a/fdm.c
+++ b/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
@@ -251,7 +247,7 @@ hook_priority_to_list(struct fdm *fdm, enum fdm_hook_priority priority)
case FDM_HOOK_PRIORITY_HIGH: return &fdm->hooks_high;
}
- xassert(false);
+ BUG("unhandled priority type");
return NULL;
}