Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



> Log Message:
> Move common logic in selcommon() and pollcommon() into sel_do_scan().
> Avoids code duplication.  XXX: pollsock() should be converted too, except
> it's a bit ugly.
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.16 -r1.17 src/sys/kern/sys_select.c

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);
+               }
 
enami.


Home | Main Index | Thread Index | Old Index