diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2014-11-26 16:29:53 +0100 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2014-11-26 16:29:53 +0100 |
commit | db4c7c19512504ee1391728248ae08c966a60b43 (patch) | |
tree | 642e992f52cbce0a91f7232e49aad2e34b5a04f2 /src/nolo.c | |
parent | 52efd5a404f3c8ee64b62ed55c954a151e61153a (diff) | |
download | 0xFFFF-db4c7c19512504ee1391728248ae08c966a60b43.tar.bz2 |
all: Use internal MEMMEM instead gnu memem
It is used only on small strings, so it is fast enough
Diffstat (limited to 'src/nolo.c')
-rw-r--r-- | src/nolo.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -127,7 +127,7 @@ static int nolo_identify_string(struct usb_device_info * dev, const char * str, if ( (size_t)ret > sizeof(buf) ) ret = sizeof(buf); - ptr = memmem(buf, ret, str, strlen(str)); + ptr = MEMMEM(buf, ret, str, strlen(str)); if ( ! ptr ) ERROR_RETURN("Substring was not found", -1); @@ -326,7 +326,7 @@ static int nolo_send_image(struct usb_device_info * dev, struct image * image, i for ( i = 0; bufs[i]; ++i ) { len = ((uint8_t*)bufs[i])[0]; - if ( memmem(bufs[i]+1, len, buf, strlen(buf)) ) + if ( MEMMEM(bufs[i]+1, len, buf, strlen(buf)) ) break; } |