This makes sure the subsequent error messages print a sane value when
libusb fails without touching the variable.
static int read_data(am7xxx_device dev, uint8_t *buffer, unsigned int len)
{
int ret;
- int transferred;
+ int transferred = 0;
ret = libusb_bulk_transfer(dev, 0x81, buffer, len, &transferred, 0);
if (ret != 0 || (unsigned int)transferred != len) {
static int send_data(am7xxx_device dev, uint8_t *buffer, unsigned int len)
{
int ret;
- int transferred;
+ int transferred = 0;
#if DEBUG
printf("\nsending -->\n");