diff --git a/src/buspirate.c b/src/buspirate.c index e4d09104..8c3ee1a9 100644 --- a/src/buspirate.c +++ b/src/buspirate.c @@ -669,7 +669,7 @@ static int buspirate_start_spi_mode_ascii(const PROGRAMMER *pgm) { if (rcvd == NULL) { return -1; } - if (strstr(rcvd, "Normal (H=3.3V, L=GND)")) { + if (str_contains(rcvd, "Normal (H=3.3V, L=GND)")) { /* BP firmware 2.1 defaults to Open-drain output. * That doesn't work on my board, even with pull-up * resistors. Select 3.3V output mode instead. */ diff --git a/src/developer_opts.c b/src/developer_opts.c index 5f60784a..ccb25d8b 100644 --- a/src/developer_opts.c +++ b/src/developer_opts.c @@ -345,7 +345,7 @@ int dev_message(int msglvl, const char *fmt, ...) { int dev_has_subsstr_comms(const LISTID comms, const char *subs) { if(comms) for(LNODEID ln=lfirst(comms); ln; ln=lnext(ln)) - if(strstr((char *) ldata(ln), subs)) + if(str_contains((char *) ldata(ln), subs)) return 1; return 0; } diff --git a/src/usb_libusb.c b/src/usb_libusb.c index 605828ee..24305b9c 100644 --- a/src/usb_libusb.c +++ b/src/usb_libusb.c @@ -155,7 +155,7 @@ static int usbdev_open(const char *port, union pinfo pinfo, union filedescriptor * whether we have to search for a HID interface * below. */ - if(strstr(product, "CMSIS-DAP") != NULL) + if(str_contains(product, "CMSIS-DAP")) { pinfo.usbinfo.flags |= PINFO_FL_USEHID; /* The JTAGICE3 running the CMSIS-DAP firmware doesn't @@ -163,7 +163,7 @@ static int usbdev_open(const char *port, union pinfo pinfo, union filedescriptor fd->usb.eep = 0; } - if(strstr(product, "mEDBG") != NULL) + if(str_contains(product, "mEDBG")) { /* The AVR Xplained Mini uses different endpoints. */ fd->usb.rep = 0x81;