Skip to content

Commit de57172

Browse files
committed
temporary comment out ft_memzero to not warn Valgrind
1 parent 7e4930c commit de57172

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/fu_util/impl/ft_impl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ ft_realloc_arr(void* ptr, size_t elem_sz, size_t old_elems, size_t new_elems) {
7575
static const uint8_t zero[4096] = {0};
7676
void
7777
ft_memzero(void *_ptr, size_t sz) {
78+
#ifdef OPTIMIZE_FT_MEMZERO
7879
uint8_t* ptr = _ptr;
7980
uintptr_t ptri = (uintptr_t)ptr;
8081
uintptr_t diff;
@@ -98,6 +99,7 @@ ft_memzero(void *_ptr, size_t sz) {
9899
}
99100

100101
if (sz)
102+
#endif
101103
memset(ptr, 0, sz);
102104
}
103105

0 commit comments

Comments
 (0)