Hello, enami tsugutomo <tsugutomo.en...@jp.sony.com> wrote: > > The test `if (selpoll)' is unnecessary if scanner function is passed > directly instead of the flag. > > - error = selscan(l, (fd_mask *)(bits + ni * 0), > - (fd_mask *)(bits + ni * 3), nd, retval); > + if (selpoll) { > + error = selscan((char *)fds, nfds, retval); > + } else { > + error = pollscan((struct pollfd *)fds, nfds, > retval); > + }
You mean by function pointer? I was considering it, but function pointers are a bit slower. Perhaps hardly matters, since we perform fo_poll()s, but there is also a nasty pollsock()... -- Mindaugas