commit | c0d66826b71f05403f36c7f8234ff8f7ecbd1590 | [log] [tgz] |
---|---|---|
author | Bill Fenner <fenner@gmail.com> | Tue Jul 22 06:49:28 2014 -0700 |
committer | Bill Fenner <fenner@gmail.com> | Tue Jul 22 06:49:28 2014 -0700 |
tree | 2983de710f4e0fc0e7ddac95ac670ac9697a2a13 | |
parent | dcad31aeb442369a6fb52f4dc7d4f781bc56006c [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.