From a6d2a63f95f5140d2ff7caa64f1e3122c0682fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Mon, 23 Jun 2014 02:09:56 +0200 Subject: [PATCH] Fix uninitialized return value in iomux_update_events --- src/iomux_impl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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;