- The configure script now prefers Clang over GCC.
- Fixed a compile problem on AIX (STR #4307)
+ - The USB backend could crash on libusb-based systems if USB was
+ disabled in the BIOS (<rdar://problem/13875729>)
- Fixed a rounding error in the PWG media size mapping code
(<rdar://problem/13493241>)
- Fixed several ipptool test files that used old STATUS names.
/* Pointer to current alternate setting */
const struct libusb_endpoint_descriptor *endpptr = NULL;
/* Pointer to current endpoint */
- ssize_t numdevs, /* number of connected devices */
+ ssize_t err = 0, /* Error code */
+ numdevs, /* number of connected devices */
i = 0;
uint8_t conf, /* Current configuration */
iface, /* Current interface */
* Initialize libusb...
*/
- libusb_init(NULL);
+ err = libusb_init(NULL);
+ if (err)
+ {
+ fprintf(stderr, "DEBUG: Unable to initialize USB access via libusb, "
+ "libusb error %i\n", err);
+ return (NULL);
+ }
+
numdevs = libusb_get_device_list(NULL, &list);
fprintf(stderr, "DEBUG: libusb_get_device_list=%d\n", (int)numdevs);
* Clean up ....
*/
- libusb_free_device_list(list, 1);
+ if (numdevs >= 0)
+ libusb_free_device_list(list, 1);
libusb_exit(NULL);
return (NULL);