From 7d8c72feb8041a6757a9dacb4e9d8017a689bec4 Mon Sep 17 00:00:00 2001 From: quou Date: Sat, 28 Dec 2024 19:03:56 +1100 Subject: replace memset --- qstd/memory.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qstd/memory.c') diff --git a/qstd/memory.c b/qstd/memory.c index 81795d6..b12ec75 100644 --- a/qstd/memory.c +++ b/qstd/memory.c @@ -11,6 +11,12 @@ int align_size(int s, int a) { return (s + (a - 1)) & -a; } +void zero(void* buf, int size) { + int i; + for (i = 0; i < size; i++) + ((uint8_t*)buf)[i] = 0; +} + static uintptr_t align_address( uintptr_t ad, size_t al -- cgit v1.2.3-54-g00ecf