Fix compile warning.

This commit is contained in:
Jan Vidar Krey 2011-01-03 00:12:40 +01:00
parent 9b57279628
commit 4c238dd946
2 changed files with 5 additions and 1 deletions

View File

@ -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 */

View File

@ -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;