Fix uninitialized return value in iomux_update_events
This commit is contained in:
+2
-4
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user