Fix compile warning.
This commit is contained in:
parent
9b57279628
commit
4c238dd946
@ -246,6 +246,10 @@ typedef unsigned __int64 uint64_t;
|
||||
#define strcasecmp _stricmp
|
||||
#define strncasecmp _strnicmp
|
||||
#define atoll _atoi64
|
||||
#include <io.h>
|
||||
#define open _open
|
||||
#define close _close
|
||||
#define read _read
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_UHUB_SYSTEM_H */
|
||||
|
@ -341,7 +341,7 @@ void* memmem(const void *haystack, size_t haystacklen, const void *needle, size_
|
||||
char* c_pat = (char*) needle;
|
||||
char* ptr = memchr(c_buf, c_pat[0], haystacklen);
|
||||
|
||||
while (ptr && (&ptr[0] - &c_buf[0] < haystacklen))
|
||||
while (ptr && ((size_t) (&ptr[0] - &c_buf[0]) < haystacklen))
|
||||
{
|
||||
if (!memcmp(ptr, c_pat, needlelen))
|
||||
return ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user