Skip to content

Commit

Permalink
Update htool_usb.c for format
Browse files Browse the repository at this point in the history
  • Loading branch information
paipeng-g authored May 14, 2024
1 parent d01aca4 commit 54326ed
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/htool_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,12 @@ static void print_device(void* cb_param, libusb_device* dev,
goto cleanup;
}
char product_name[512];
int rv_or_len = libusb_get_string_descriptor_ascii(dev_handle, descriptor->iProduct,
(unsigned char*)product_name,
sizeof(product_name));
int rv_or_len = libusb_get_string_descriptor_ascii(
dev_handle, descriptor->iProduct, (unsigned char*)product_name,
sizeof(product_name));
if (rv_or_len < 0) {
fprintf(stderr, " (unable to get product string: %s)", libusb_strerror(rv_or_len));
fprintf(stderr, " (unable to get product string: %s)",
libusb_strerror(rv_or_len));
goto cleanup2;
}
// valid product_name is returned
Expand Down

0 comments on commit 54326ed

Please sign in to comment.