aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/command.c b/src/command.c
index 6306f7e..f629fde 100644
--- a/src/command.c
+++ b/src/command.c
@@ -222,14 +222,8 @@ free_ctx:
return ret;
}
-int cmd_dispatcher_add_to_event_loop(const struct cmd_dispatcher *dispatcher,
- struct event_loop *loop, int fd)
+int cmd_dispatcher_add_to_event_loop(struct cmd_dispatcher *dispatcher, struct event_loop *loop,
+ int fd)
{
- struct event_fd entry = {
- .fd = fd,
- .events = POLLIN,
- .handler = cmd_dispatcher_handle_event,
- .arg = (void *)dispatcher,
- };
- return event_loop_add(loop, &entry);
+ return event_loop_add(loop, fd, POLLIN, cmd_dispatcher_handle_event, dispatcher);
}