summaryrefslogtreecommitdiff
path: root/ev.h
diff options
context:
space:
mode:
Diffstat (limited to 'ev.h')
-rw-r--r--ev.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ev.h b/ev.h
index ecca856..1b33bf2 100644
--- a/ev.h
+++ b/ev.h
@@ -268,7 +268,7 @@ void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revent
((struct ev_watcher *)(ev))->active = \
((struct ev_watcher *)(ev))->pending = \
((struct ev_watcher *)(ev))->priority = 0; \
- ((struct ev_watcher *)(ev))->cb = (cb_); \
+ (ev)->cb = (cb_); \
} while (0)
#define ev_io_set(ev,fd_,events_) do { (ev)->fd = (fd_); (ev)->events = (events_); } while (0)
@@ -293,7 +293,7 @@ void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revent
#define ev_is_active(ev) (0 + ((struct ev_watcher *)(ev))->active) /* ro, true when the watcher has been started */
#define ev_priority(ev) ((struct ev_watcher *)(ev))->priority /* rw */
-#define ev_cb(ev) ((struct ev_watcher *)(ev))->cb /* rw */
+#define ev_cb(ev) (ev)->cb /* rw */
#define ev_set_priority(ev,pri) ev_priority (ev) = (pri)
#define ev_set_cb(ev,cb_) ev_cb (ev) = (cb_)