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

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