diff --git a/src/iomux_impl.c b/src/iomux_impl.c index b21f072..6f60744 100644 --- a/src/iomux_impl.c +++ b/src/iomux_impl.c @@ -142,16 +142,14 @@ int iomux_unregister_fd(struct IOMux *mux, struct IOMuxFD *fd) int iomux_update_events(struct IOMux *mux, struct IOMuxFD *fd, unsigned int what) { - int rc; + int rc = 0; assert(mux != NULL); assert(fd != NULL); assert(fd->callback != NULL); assert(fd->fd >= 0); if (fd->what != what) { - mux->ops.update_events_impl(mux, fd); - } else { - rc = 0; + rc = mux->ops.update_events_impl(mux, fd); } return rc;