summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorMarc Alexander Lehmann <libev@schmorp.de>2019-06-26 00:01:46 +0000
committerMarc Alexander Lehmann <libev@schmorp.de>2019-06-26 00:01:46 +0000
commite8f6f2f60a413ae025a7f2d2f9c185f3a62c584b (patch)
treee0c70817eb5c2bb7a27612cf6581e0afc43bc9af /ev.c
parent9d53c7d7dbea1324b46bbcad1e9504f592f5b4a9 (diff)
downloadlibev-e8f6f2f60a413ae025a7f2d2f9c185f3a62c584b.tar.gz
libev-e8f6f2f60a413ae025a7f2d2f9c185f3a62c584b.zip
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ev.c b/ev.c
index 4a932b9..62b99ea 100644
--- a/ev.c
+++ b/ev.c
@@ -3925,6 +3925,9 @@ ev_io_start (EV_P_ ev_io *w) EV_NOEXCEPT
assert (("libev: ev_io_start called with negative fd", fd >= 0));
assert (("libev: ev_io_start called with illegal event mask", !(w->events & ~(EV__IOFDSET | EV_READ | EV_WRITE))));
+#if EV_VERIFY >= 2
+ assert (("libev: ev_io_start called on watcher with invalid fd", fd_valid (fd)));
+#endif
EV_FREQUENT_CHECK;
ev_start (EV_A_ (W)w, 1);
@@ -3950,6 +3953,9 @@ ev_io_stop (EV_P_ ev_io *w) EV_NOEXCEPT
assert (("libev: ev_io_stop called with illegal fd (must stay constant after start!)", w->fd >= 0 && w->fd < anfdmax));
+#if EV_VERIFY >= 2
+ assert (("libev: ev_io_stop called on watcher with invalid fd", fd_valid (w->fd)));
+#endif
EV_FREQUENT_CHECK;
wlist_del (&anfds[w->fd].head, (WL)w);