mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
use strstr instead of memcmp
This commit is contained in:
parent
e0f73d4576
commit
0490dc9d07
1 changed files with 2 additions and 1 deletions
|
@ -680,7 +680,8 @@ int TestProxmark(pm3_device_t *dev) {
|
|||
} else {
|
||||
int res;
|
||||
if (is_tcp_conn) {
|
||||
if (memcmp(g_conn.serial_port_name + 4, "localhost", 9) == 0 || memcmp(g_conn.serial_port_name + 4, "127.0.0.1", 9) == 0) {
|
||||
if ((strstr(g_conn.serial_port_name, "localhost") != NULL) ||
|
||||
(strstr(g_conn.serial_port_name, "127.0.0.1") != NULL)) {
|
||||
res = uart_reconfigure_timeouts(UART_USB_CLIENT_RX_TIMEOUT_MS * 2);
|
||||
} else {
|
||||
res = uart_reconfigure_timeouts(UART_TCP_CLIENT_RX_TIMEOUT_MS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue