Windows: fd_to_winfd() shouldn't treat fd 0 as invalid
commit388a9a88059cb5b5a8088788f5ccd6c3eec80f62
authorSimon Haggett <simon.haggett@realvnc.com>
Thu, 11 Jul 2013 16:27:00 +0000 (11 17:27 +0100)
committerPete Batard <pete@akeo.ie>
Wed, 7 Aug 2013 23:37:30 +0000 (8 00:37 +0100)
treeed1ff5fe7ce5749c5d1997872fafa421cef54869
parenta3b92f8fe1953015322ed400570701943a59f3af
Windows: fd_to_winfd() shouldn't treat fd 0 as invalid

* fd_to_winfd() currently returns INVALID_WINFD if fd is 0, but usbi_create_fd()
  can legally assign an fd number of 0 if poll_fd[0] is not already occupied.
* Transfers which are assigned an fd number of 0 for their event handle are then
  unable to have their event handle retrieved later on.

See http://libusbx.1081486.n5.nabble.com/Libusbx-devel-PATCH-1-1-Windows-fd-to-winfd-shouldn-t-treat-fd-0-as-invalid-tt1535.html
libusb/os/poll_windows.c