commit | 4224cabcb112d0d437f9ca9f4d3430501d1c8750 | [log] [tgz] |
---|---|---|
author | Bill Fenner <fenner@gmail.com> | Tue Jul 22 06:49:28 2014 -0700 |
committer | Bart Van Assche <bvanassche@acm.org> | Thu Sep 04 12:56:42 2014 +0200 |
tree | edbb697be2fd7f819f947a4c0ec669f2853dd0d0 | |
parent | 3524a92f227eb3e736908b1f1f525da2dc949d22 [diff] |
When enlarging a large_fd_set, use FD_ZERO if possible The most common case of creating a large_fd_set on UNIX is to create it with size zero, and then immediately enlarge it to size FD_SETSIZE. Instead of looping and calling FD_CLR(), we can optimize this common case with the OS's FD_ZERO.