diff options
| author | Craig Barnes <craigbarnes@protonmail.com> | 2021-02-10 21:03:00 +0000 |
|---|---|---|
| committer | Craig Barnes <craigbarnes@protonmail.com> | 2021-02-10 21:03:00 +0000 |
| commit | 1add430b5b6bc2ff616fb859c3b882602ff5222d (patch) | |
| tree | a7df73c007742a43b4948a8ef4565be5bf18e070 /fdm.c | |
| parent | Merge branch 'turn-meson-terminfo-option-into-a-feature' (diff) | |
| parent | Mark slave_exec() as "noreturn" and convert xassert(false) to BUG(...) (diff) | |
Merge branch 'xassert-false'
Diffstat (limited to 'fdm.c')
| -rw-r--r-- | fdm.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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; } |
