X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Ffx2lafw%2Fprotocol.c;h=fae80b72171df38fa02e30325a2841f856ef98e7;hb=c35276dd92b948d0c8c71bd816a8a75453895e81;hp=e12fd0bd5a988ee210d3cb170fc59cdbd835c687;hpb=b9d530920fa97ab92d5f78f6f00a1ffc73259f2f;p=libsigrok.git diff --git a/src/hardware/fx2lafw/protocol.c b/src/hardware/fx2lafw/protocol.c index e12fd0bd..fae80b72 100644 --- a/src/hardware/fx2lafw/protocol.c +++ b/src/hardware/fx2lafw/protocol.c @@ -140,7 +140,7 @@ SR_PRIV int fx2lafw_command_start_acquisition(const struct sr_dev_inst *sdi) * Check the USB configuration to determine if this is an fx2lafw device. * * @return TRUE if the device's configuration profile matches fx2lafw - * configuration, FALSE otherwise. + * configuration, FALSE otherwise. */ SR_PRIV gboolean match_manuf_prod(libusb_device *dev, const char *manufacturer, const char *product) @@ -163,13 +163,13 @@ SR_PRIV gboolean match_manuf_prod(libusb_device *dev, const char *manufacturer, if (libusb_get_string_descriptor_ascii(hdl, des.iManufacturer, strdesc, sizeof(strdesc)) < 0) break; - if (strncmp((const char *)strdesc, manufacturer, 6)) + if (strcmp((const char *)strdesc, manufacturer)) break; if (libusb_get_string_descriptor_ascii(hdl, des.iProduct, strdesc, sizeof(strdesc)) < 0) break; - if (strncmp((const char *)strdesc, product, 7)) + if (strcmp((const char *)strdesc, product)) break; ret = TRUE;