commit | 065e586b0668cb180074dbfb2dfd0640f8708b0d | [log] [tgz] |
---|---|---|
author | Sean McBride <sean@rogue-research.com> | Sat Dec 15 16:26:14 2018 -0500 |
committer | Nathan Hjelm <hjelmn@me.com> | Tue Jan 08 18:10:37 2019 -0700 |
tree | 9ea59a64cde7ab05f6929659402877da9b7370a5 | |
parent | 9a23fe1fd1e8b5035c622e3c6d4ae555513dec3c [diff] |
Tried to untangle mixing of int, enum libusb_error, kern_return_t, and IOReturn. - Replace all kern_return_t with IOReturn, they are basically the same, but IOReturn is more common in IOUSBLib - improve consistency by using the name 'kresult' for all IOReturn-type results, and not using that name for libusb_error return values. - changed a few functions to use real 'bool' (this file already uses C99) - replaced some raw '0's with LIBUSB_SUCCESS or kIOReturnSuccess. - replaced some raw 'int's with either IOReturn or enum libusb_error. - replaced ambiguous "if (kresult)" with more explicit "if (kresult != kIOReturnSuccess)" - replaced incorrect use of darwin_to_libusb with darwin_transfer_status Most of these were found by increasing the compiler warning level. Closes #510 Signed-off-by: Nathan Hjelm <hjelmn@me.com>
libusb is a library for USB device access from Linux, macOS, Windows, OpenBSD/NetBSD and Haiku userspace. It is written in C (Haiku backend in C++) and licensed under the GNU Lesser General Public License version 2.1 or, at your option, any later version (see COPYING).
libusb is abstracted internally in such a way that it can hopefully be ported to other operating systems. Please see the PORTING file for more information.
libusb homepage: http://libusb.info/
Developers will wish to consult the API documentation: http://api.libusb.info
Use the mailing list for questions, comments, etc: http://mailing-list.libusb.info
(Please use the mailing list rather than mailing developers directly)