tests: slow_memmem now returns size_t

Makes more sense than uint64_t for an offset, and agrees with
the %zu used to print results.

Found by codacy.com
This commit is contained in:
moneromooo-monero 2018-11-23 13:11:40 +00:00
parent 84dd674cd0
commit 3002307418
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
2 changed files with 5 additions and 5 deletions

View file

@ -1026,7 +1026,7 @@ namespace cryptonote
//------------------------------------------------------------------------------------------------------------------------------
// equivalent of strstr, but with arbitrary bytes (ie, NULs)
// This does not differentiate between "not found" and "found at offset 0"
uint64_t slow_memmem(const void* start_buff, size_t buflen,const void* pat,size_t patlen)
size_t slow_memmem(const void* start_buff, size_t buflen,const void* pat,size_t patlen)
{
const void* buf = start_buff;
const void* end=(const char*)buf+buflen;