Skip to content

Commit 681ca5e

Browse files
committed
fix :-(
1 parent cfd1a72 commit 681ca5e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/fu_util/impl/ft_impl.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ ft_realloc_arr(void* ptr, size_t elem_sz, size_t old_elems, size_t new_elems) {
7171
return ptr;
7272
}
7373

74+
#ifdef OPTIMIZE_FT_MEMZERO
7475
#define MEMZERO_BLOCK 4096
7576
static const uint8_t zero[4096] = {0};
7677
void
7778
ft_memzero(void *_ptr, size_t sz) {
78-
#ifdef OPTIMIZE_FT_MEMZERO
7979
uint8_t* ptr = _ptr;
8080
uintptr_t ptri = (uintptr_t)ptr;
8181
uintptr_t diff;
@@ -99,9 +99,14 @@ ft_memzero(void *_ptr, size_t sz) {
9999
}
100100

101101
if (sz)
102-
#endif
103102
memset(ptr, 0, sz);
104103
}
104+
#else
105+
void
106+
ft_memzero(void *ptr, size_t sz) {
107+
memset(ptr, 0, sz);
108+
}
109+
#endif
105110

106111
/* String utils */
107112

0 commit comments

Comments
 (0)