Vartype and return flunkies
diff --git a/ChangeLog b/ChangeLog
index c788fc0..490fbb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-08-18  Linus Walleij <triad@df.lth.se>
+
+	* src/libusb-glue.c: some vartype and return flunkies.
+
 2008-08-17  Linus Walleij <triad@df.lth.se>
 
 	* src/libusb-glue.c: some handling of ptp_usb_getdata()
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;
 			}