memory-util: drop unused memdup_reverse()

With the previous commit, now the function is unused anymore.
Let's drop it.
This commit is contained in:
Yu Watanabe
2026-07-03 03:02:56 +09:00
parent b5e75134f3
commit 75bc106095
2 changed files with 0 additions and 19 deletions
-16
View File
@@ -19,22 +19,6 @@ size_t page_size(void) {
return pgsz;
}
void* memdup_reverse(const void *mem, size_t size) {
assert(mem);
assert(size != 0);
void *p = malloc(size);
if (!p)
return NULL;
uint8_t *p_dst = p;
const uint8_t *p_src = mem;
for (size_t i = 0, k = size; i < size; i++, k--)
p_dst[i] = p_src[k-1];
return p;
}
void* erase_and_free(void *p) {
size_t l;
-3
View File
@@ -98,6 +98,3 @@ static inline void erase_and_freep(void *p) {
static inline void erase_char(char *p) {
explicit_bzero_safe(p, sizeof(char));
}
/* Makes a copy of the buffer with reversed order of bytes */
void* memdup_reverse(const void *mem, size_t size);