mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibC: Fix memmem signature compliance
This commit is contained in:
parent
7f6a49c085
commit
04b06afd39
2 changed files with 4 additions and 3 deletions
|
@ -175,9 +175,10 @@ void* memmove(void* dest, void const* src, size_t n)
|
||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
void const* memmem(void const* haystack, size_t haystack_length, void const* needle, size_t needle_length)
|
// https://linux.die.net/man/3/memmem (GNU extension)
|
||||||
|
void* memmem(void const* haystack, size_t haystack_length, void const* needle, size_t needle_length)
|
||||||
{
|
{
|
||||||
return AK::memmem(haystack, haystack_length, needle, needle_length);
|
return const_cast<void*>(AK::memmem(haystack, haystack_length, needle, needle_length));
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/strcpy.html
|
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/strcpy.html
|
||||||
|
|
|
@ -28,7 +28,7 @@ int timingsafe_memcmp(void const*, void const*, size_t);
|
||||||
void* memcpy(void*, void const*, size_t);
|
void* memcpy(void*, void const*, size_t);
|
||||||
void* memmove(void*, void const*, size_t);
|
void* memmove(void*, void const*, size_t);
|
||||||
void* memchr(void const*, int c, size_t);
|
void* memchr(void const*, int c, size_t);
|
||||||
void const* memmem(void const* haystack, size_t, void const* needle, size_t);
|
void* memmem(void const* haystack, size_t, void const* needle, size_t);
|
||||||
|
|
||||||
void* memset(void*, int, size_t);
|
void* memset(void*, int, size_t);
|
||||||
void explicit_bzero(void*, size_t) __attribute__((nonnull(1)));
|
void explicit_bzero(void*, size_t) __attribute__((nonnull(1)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue