Author: hselasky Date: Sat Dec 3 16:19:07 2011 New Revision: 228235 URL: http://svn.freebsd.org/changeset/base/228235
Log: libusb_open() sets the given device handle to NULL if it fails, so there is no need to do it again after returning. Submitted by: Christoph Mallon MFC after: 3 days Modified: head/lib/libusb/libusb10.c Modified: head/lib/libusb/libusb10.c ============================================================================== --- head/lib/libusb/libusb10.c Sat Dec 3 15:51:15 2011 (r228234) +++ head/lib/libusb/libusb10.c Sat Dec 3 16:19:07 2011 (r228235) @@ -427,8 +427,7 @@ libusb_open_device_with_vid_pid(libusb_c */ if (pdesc->idVendor == vendor_id && pdesc->idProduct == product_id) { - if (libusb_open(devs[j], &pdev) < 0) - pdev = NULL; + libusb_open(devs[j], &pdev); break; } } _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"