Commit 6b56b98fc32cb74df7d9b030dfedf941ff77ed0f

Sam Lantinga 2020-11-21T09:26:11

Fixed is_BLE() return value

diff --git a/src/hidapi/linux/hid.c b/src/hidapi/linux/hid.c
index 6a94334..03828ff 100644
--- a/src/hidapi/linux/hid.c
+++ b/src/hidapi/linux/hid.c
@@ -298,13 +298,13 @@ static int is_BLE(hid_device *dev)
 			"hid",
 			NULL);
 		if (hid_dev) {
-			unsigned short dev_vid;
-			unsigned short dev_pid;
-			int bus_type;
+			unsigned short dev_vid = 0;
+			unsigned short dev_pid = 0;
+			int bus_type = 0;
 			char *serial_number_utf8 = NULL;
 			char *product_name_utf8 = NULL;
 
-			ret = parse_uevent_info(
+			parse_uevent_info(
 			           udev_device_get_sysattr_value(hid_dev, "uevent"),
 			           &bus_type,
 			           &dev_vid,
@@ -845,6 +845,7 @@ int HID_API_EXPORT hid_get_feature_report(hid_device *dev, unsigned char *data, 
 	int res;
 
 	/* It looks like HIDIOCGFEATURE() on Bluetooth LE devices doesn't return the report number */
+	printf("HIDIOCGFEATURE\n");
 	if (dev->needs_ble_hack) {
 		data[1] = data[0];
 		++data;