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 b680671d2a
commit 930c90b674
+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 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;