1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-01-30 16:54:15 +01:00
parent d2e0a276d5
commit 32de283103

View File

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