mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-05 01:55:21 +03:00
LibC: Fix memmem signature compliance
This commit is contained in:
parent
7f6a49c085
commit
04b06afd39
Notes:
sideshowbarker
2024-07-17 04:34:25 +09:00
Author: https://github.com/emilytrau 🔰 Commit: https://github.com/SerenityOS/serenity/commit/04b06afd39 Pull-request: https://github.com/SerenityOS/serenity/pull/19264
@ -175,9 +175,10 @@ void* memmove(void* dest, void const* src, size_t n)
|
||||
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
|
||||
|
@ -28,7 +28,7 @@ int timingsafe_memcmp(void const*, void const*, size_t);
|
||||
void* memcpy(void*, void const*, size_t);
|
||||
void* memmove(void*, void const*, 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 explicit_bzero(void*, size_t) __attribute__((nonnull(1)));
|
||||
|
Loading…
Reference in New Issue
Block a user