Conditions always true in tevent_standard.c
Nikolai Kondrashov
Nikolai.Kondrashov at redhat.com
Tue Jun 28 11:07:10 UTC 2016
Hi everyone,
I was reading about tevent and browsing the code, when I noticed these two
conditions in tevent_standard.c:
ret = glue->epoll_ops->loop_once(ev, location);
if (glue->epoll_ops != NULL) {
/* No fallback */
return ret;
}
and
ret = glue->epoll_ops->loop_wait(ev, location);
if (glue->epoll_ops != NULL) {
/* No fallback */
return ret;
}
To me it seems they are never going to be false (the program would segfault
before they are reached if glue->epoll_ops is NULL) and I suspect there's some
logic bug here. However, unfortunately, I don't have time to figure out what
exactly should be done about this, so I'll leave it up to you.
Still, if there's some purpose to that, then I think a comment is in order.
Thanks!
Nick
P.S. Overall I quite like the code, it's neat and tidy!
More information about the samba-technical
mailing list