Commit 32de2831 authored by Michael Niedermayer's avatar Michael Niedermayer

avstring: fix "warning: return discards const qualifier from pointer target type"

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d2e0a276
......@@ -69,11 +69,11 @@ char *av_strnstr(const char *haystack, const char *needle, size_t hay_length)
{
size_t needle_len = strlen(needle);
if (!needle_len)
return haystack;
return (char*)haystack;
while (hay_length >= needle_len) {
hay_length--;
if (!memcmp(haystack, needle, needle_len))
return haystack;
return (char*)haystack;
haystack++;
}
return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment