diff --git a/hypervisor/include/lib/rtl.h b/hypervisor/include/lib/rtl.h index c22fd36aa..a5d5abb3c 100644 --- a/hypervisor/include/lib/rtl.h +++ b/hypervisor/include/lib/rtl.h @@ -21,7 +21,6 @@ union u_qword { /* Function prototypes */ void udelay(uint32_t us); -void *memchr(const void *void_s, int32_t c, size_t n); int32_t strcmp(const char *s1_arg, const char *s2_arg); int32_t strncmp(const char *s1_arg, const char *s2_arg, size_t n_arg); char *strncpy_s(char *d_arg, size_t dmax, const char *s_arg, size_t slen_arg); diff --git a/hypervisor/lib/memory.c b/hypervisor/lib/memory.c index 9ee65a1a8..4f6bc7c60 100644 --- a/hypervisor/lib/memory.c +++ b/hypervisor/lib/memory.c @@ -259,21 +259,6 @@ void free(const void *ptr) } } -void *memchr(const void *void_s, int32_t c, size_t n) -{ - uint8_t val = (uint8_t)c; - uint8_t *ptr = (uint8_t *)void_s; - uint8_t *end = ptr + n; - - while (ptr < end) { - if (*ptr == val) { - return ((void *)ptr); - } - ptr++; - } - return NULL; -} - static inline void memcpy_erms(void *d, const void *s, size_t slen) { asm volatile ("rep; movsb"