From e56136ce1192d04a52b01ccb41284f0b7896430e Mon Sep 17 00:00:00 2001 From: Craig Barnes Date: Sat, 16 Jan 2021 20:16:00 +0000 Subject: debug: rename assert() to xassert(), to avoid clashing with --- fdm.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'fdm.c') diff --git a/fdm.c b/fdm.c index d0f9f9d1..3394f10c 100644 --- a/fdm.c +++ b/fdm.c @@ -84,11 +84,11 @@ fdm_destroy(struct fdm *fdm) LOG_WARN("hook list not empty"); } - assert(tll_length(fdm->fds) == 0); - assert(tll_length(fdm->deferred_delete) == 0); - assert(tll_length(fdm->hooks_low) == 0); - assert(tll_length(fdm->hooks_normal) == 0); - assert(tll_length(fdm->hooks_high) == 0); + xassert(tll_length(fdm->fds) == 0); + xassert(tll_length(fdm->deferred_delete) == 0); + xassert(tll_length(fdm->hooks_low) == 0); + xassert(tll_length(fdm->hooks_normal) == 0); + xassert(tll_length(fdm->hooks_high) == 0); tll_free(fdm->fds); tll_free(fdm->deferred_delete); @@ -106,14 +106,14 @@ fdm_add(struct fdm *fdm, int fd, int events, fdm_handler_t handler, void *data) int flags = fcntl(fd, F_GETFL); if (!(flags & O_NONBLOCK)) { LOG_ERR("FD=%d is in blocking mode", fd); - assert(false); + xassert(false); return false; } tll_foreach(fdm->fds, it) { if (it->item->fd == fd) { LOG_ERR("FD=%d already registered", fd); - assert(false); + xassert(false); return false; } } @@ -251,7 +251,7 @@ hook_priority_to_list(struct fdm *fdm, enum fdm_hook_priority priority) case FDM_HOOK_PRIORITY_HIGH: return &fdm->hooks_high; } - assert(false); + xassert(false); return NULL; } @@ -294,7 +294,7 @@ fdm_hook_del(struct fdm *fdm, fdm_hook_t hook, enum fdm_hook_priority priority) bool fdm_poll(struct fdm *fdm) { - assert(!fdm->is_polling && "nested calls to fdm_poll() not allowed"); + xassert(!fdm->is_polling && "nested calls to fdm_poll() not allowed"); if (fdm->is_polling) { LOG_ERR("nested calls to fdm_poll() not allowed"); return false; -- cgit v1.3