Vartype and return flunkies
diff --git a/src/libusb-glue.c b/src/libusb-glue.c
index 9d33dff..6e866c4 100644
--- a/src/libusb-glue.c
+++ b/src/libusb-glue.c
@@ -1141,7 +1141,7 @@
 			/* stuff data directly to passed data handler */
 			while (1) {
 				unsigned long readdata;
-				int xret;
+				uint16_t xret;
 
 				xret = ptp_read_func(
 					PTP_USB_BULK_HS_MAX_PACKET_LEN_READ,
@@ -1151,7 +1151,7 @@
 					0
 				);
 				if (xret != PTP_RC_OK)
-					return ret;
+					return xret;
 				if (readdata < PTP_USB_BULK_HS_MAX_PACKET_LEN_READ)
 					break;
 			}