mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Minor optimisation (?).
This commit is contained in:
parent
87e10dd412
commit
e195690acd
@ -149,11 +149,19 @@ void
|
|||||||
set_handlers(int fd, select_handler_T read_func, select_handler_T write_func,
|
set_handlers(int fd, select_handler_T read_func, select_handler_T write_func,
|
||||||
select_handler_T error_func, void *data)
|
select_handler_T error_func, void *data)
|
||||||
{
|
{
|
||||||
|
struct epoll_event ev;
|
||||||
|
|
||||||
|
if (threads[fd].read_func == read_func
|
||||||
|
&& threads[fd].write_func == write_func
|
||||||
|
&& threads[fd].error_func == error_func
|
||||||
|
&& threads[fd].data == data) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
threads[fd].read_func = read_func;
|
threads[fd].read_func = read_func;
|
||||||
threads[fd].write_func = write_func;
|
threads[fd].write_func = write_func;
|
||||||
threads[fd].error_func = error_func;
|
threads[fd].error_func = error_func;
|
||||||
threads[fd].data = data;
|
threads[fd].data = data;
|
||||||
struct epoll_event ev;
|
|
||||||
|
|
||||||
memset(&ev, 0, sizeof(ev));
|
memset(&ev, 0, sizeof(ev));
|
||||||
ev.data.fd = fd;
|
ev.data.fd = fd;
|
||||||
|
Loading…
Reference in New Issue
Block a user