Fix uninitialized return value in iomux_update_events

This commit is contained in:
Nils O. Selåsdal
2014-06-23 02:09:56 +02:00
parent b0ac867936
commit a6d2a63f95
+2 -4
View File
@@ -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 iomux_update_events(struct IOMux *mux, struct IOMuxFD *fd, unsigned int what)
{ {
int rc; int rc = 0;
assert(mux != NULL); assert(mux != NULL);
assert(fd != NULL); assert(fd != NULL);
assert(fd->callback != NULL); assert(fd->callback != NULL);
assert(fd->fd >= 0); assert(fd->fd >= 0);
if (fd->what != what) { if (fd->what != what) {
mux->ops.update_events_impl(mux, fd); rc = mux->ops.update_events_impl(mux, fd);
} else {
rc = 0;
} }
return rc; return rc;