mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-30 21:08:45 +03:00
replace strstr with str_contains
This commit is contained in:
@@ -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. */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user