OpenBSD: Fix warning: 'hpriv' may be used uninitialized
authorPeter Stuge <peter@stuge.se>
Sat, 7 Apr 2012 01:55:36 +0000 (03:55 +0200)
committerPete Batard <pete@akeo.ie>
Mon, 9 Apr 2012 21:29:41 +0000 (22:29 +0100)
commit5b7d1c57f8dea7d6090d7478e4f39075c17decdb
treeb721f9f437f165463931127d09381f6ced61062c
parent974251ba94861d03dbe9837a902d84e83d301cda
OpenBSD: Fix warning: 'hpriv' may be used uninitialized

As reported in http://marc.info/?m=133376187514495

The variable would be used uninitialized when the internal list of
open devices is empty as obsd_handle_events() checks which device
the event fd belongs to, which can not actually happen, but if it
ever does happen then we will now return LIBUSB_ERROR_NO_DEVICE.

Reported-by: Xiaofan Chen <xiaofanc@gmail.com>
libusb/os/openbsd_usb.c