Prevent redundant test of I/O event readiness for any given file descriptor in patty_ax25_next_event()

This commit is contained in:
XANTRONIX Development 2015-08-09 10:13:57 -05:00 committed by XANTRONIX Industrial
parent 53791bf21d
commit a2b21eb848

View file

@ -210,6 +210,8 @@ int patty_ax25_next_event(patty_ax25 *ax25, patty_ax25_event *ev) {
ev->type = PATTY_AX25_EVENT_RECV;
ev->fd = fd;
FD_CLR(fd, &ax25->unix_fds_pending_read);
return 0;
}
@ -217,6 +219,8 @@ int patty_ax25_next_event(patty_ax25 *ax25, patty_ax25_event *ev) {
ev->type = PATTY_AX25_EVENT_SEND;
ev->fd = fd;
FD_CLR(fd, &ax25->unix_fds_pending_write);
return 0;
}
@ -224,6 +228,8 @@ int patty_ax25_next_event(patty_ax25 *ax25, patty_ax25_event *ev) {
ev->type = PATTY_AX25_EVENT_ERROR;
ev->fd = fd;
FD_CLR(fd, &ax25->unix_fds_pending_error);
return 0;
}
}