Fix uninitialized variable (should fix libusb retry handling)

Reported by cppcheck

Change-Id: I5ac7b73f2e3eaee3d5427d118944613e572f684d
This commit is contained in:
Thomas Jarosch 2015-01-04 13:35:47 +01:00
parent 8f1fbd1dc8
commit 89ab3c2761
2 changed files with 2 additions and 0 deletions

View file

@ -74,6 +74,7 @@ static int send_msc_cmd(libusb_device_handle *hdev, void *cbwcb, uint32_t data_l
struct CBW_t cbw; struct CBW_t cbw;
int ret, repeat, transferred; int ret, repeat, transferred;
repeat = 0;
memset(&cbw, 0, sizeof(cbw)); memset(&cbw, 0, sizeof(cbw));
cbw.dCBWSignature = CBW_SIGNATURE; cbw.dCBWSignature = CBW_SIGNATURE;
cbw.dCBWTag = 0; cbw.dCBWTag = 0;

View file

@ -75,6 +75,7 @@ static int send_msc_cmd(libusb_device_handle *hdev, struct CBWCB_t *cbwcb, uint3
int ret, repeat, transferred; int ret, repeat, transferred;
static uint32_t tag = 0xdaefbc01; static uint32_t tag = 0xdaefbc01;
repeat = 0;
memset(&cbw, 0, sizeof(cbw)); memset(&cbw, 0, sizeof(cbw));
cbw.dCBWSignature = CBW_SIGNATURE; cbw.dCBWSignature = CBW_SIGNATURE;
cbw.dCBWTag = tag++; cbw.dCBWTag = tag++;