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;
static int read_data(am7xxx_device dev, uint8_t *buffer, unsigned int len)
{
int ret;
ret = libusb_bulk_transfer(dev, 0x81, buffer, len, &transferred, 0);
if (ret != 0 || (unsigned int)transferred != len) {
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;
static int send_data(am7xxx_device dev, uint8_t *buffer, unsigned int len)
{
int ret;
#if DEBUG
printf("\nsending -->\n");
#if DEBUG
printf("\nsending -->\n");