X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fcommon%2Fezusb.c;h=884ceafdccf9fa693a401aecd0ffa1a170d963e6;hb=1fdb75e14528abd62ebe727537512c741a5759da;hp=68692c3a29fbbabb6f1f87d3fca590d86b0079ba;hpb=edf60d0575d039229da3676867a5eb094d0c3c5e;p=libsigrok.git diff --git a/hardware/common/ezusb.c b/hardware/common/ezusb.c index 68692c3a..884ceafd 100644 --- a/hardware/common/ezusb.c +++ b/hardware/common/ezusb.c @@ -56,15 +56,14 @@ int ezusb_install_firmware(libusb_device_handle *hdl, const char *filename) return 1; } - result = 0; - offset = 0; + result = offset = 0; while (1) { chunksize = fread(buf, 1, 4096, fw); if (chunksize == 0) break; err = libusb_control_transfer(hdl, LIBUSB_REQUEST_TYPE_VENDOR | - LIBUSB_ENDPOINT_OUT, 0xa0, offset, 0x0000, - buf, chunksize, 100); + LIBUSB_ENDPOINT_OUT, 0xa0, offset, + 0x0000, buf, chunksize, 100); if (err < 0) { g_warning("Unable to send firmware to device: %d", err); result = 1;