Skip to content

Commit

Permalink
hosted/bmp_libusb: PR review, remove excess braces process_vid_pid_ta…
Browse files Browse the repository at this point in the history
…ble_probe
  • Loading branch information
sidprice committed Jul 13, 2023
1 parent b94ccfa commit 09fc815
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/platforms/hosted/bmp_libusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,19 +324,16 @@ bool process_vid_pid_table_probe(
//
// This will read and process any strings that need special work, e.g., extracting
// a version string from a product string (BMP native)
if (debugger_devices[vid_pid_index].function != NULL) {
if (debugger_devices[vid_pid_index].function != NULL)
debugger_devices[vid_pid_index].function(
device_descriptor, device, handle, &product, &manufacturer, &serial, &version);
}
//
// Now read any strings that have not been set by a custom reader function
//
if (product == NULL) {
if (product == NULL)
product = get_device_descriptor_string(handle, device_descriptor->iProduct);
}
if (manufacturer == NULL) {
if (manufacturer == NULL)
manufacturer = get_device_descriptor_string(handle, device_descriptor->iManufacturer);
}
if (serial == NULL) {
//
// If this is an STLink V2 it does not report serial number correctly, for bypass
Expand All @@ -349,9 +346,8 @@ bool process_vid_pid_table_probe(
serial = strdup("---");
}

if (version == NULL) {
if (version == NULL)
version = strdup("---");
}

*probe_list = probe_info_add_by_id(*probe_list, probe_type, device, device_descriptor->idVendor,
device_descriptor->idProduct, manufacturer, product, serial, version);
Expand Down

0 comments on commit 09fc815

Please sign in to comment.