aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-02-21 19:01:21 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2015-02-21 19:01:21 +0100
commit6c30579882483ae99f683df22f3719d3d54e7ad3 (patch)
treec6d944bef1554de36b7d6319d828ff1f0a5225cf
parent8de88140f54ebcfeab1d2962c115e1fdf6f8c3f0 (diff)
downloadponymap-6c30579882483ae99f683df22f3719d3d54e7ad3.tar.gz
ponymap-6c30579882483ae99f683df22f3719d3d54e7ad3.tar.xz
ponymap-6c30579882483ae99f683df22f3719d3d54e7ad3.zip
Add a useful assertion to the poller
-rw-r--r--utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index 3eb7b1d..f8d0501 100644
--- a/utils.c
+++ b/utils.c
@@ -1238,6 +1238,8 @@ poller_run (struct poller *self)
continue;
struct poller_fd *fd = revents->data.ptr;
+ hard_assert (fd->index != -1);
+
struct pollfd pfd;
pfd.fd = fd->fd;
pfd.revents = poller_epoll_to_poll_events (revents->events);