From 494a0f425c9609a30f1f404744d27a70c9582ed6 Mon Sep 17 00:00:00 2001 From: Starnakin Date: Wed, 22 Jan 2025 14:44:12 +0100 Subject: [PATCH] add: bzero --- libbozo/headers/string.h | 1 + libbozo/src/string/bzero.c | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 libbozo/src/string/bzero.c diff --git a/libbozo/headers/string.h b/libbozo/headers/string.h index b3d2f2e..f5eb5b1 100644 --- a/libbozo/headers/string.h +++ b/libbozo/headers/string.h @@ -12,3 +12,4 @@ void *memcpy(void *dest, const void *src, size_t n); int memcmp(const void *s1, const void *s2, size_t n); void *memset(void *str, int c, size_t n); void *memmove(void *dest, const void *src, size_t n); +void bzero(void *s, size_t n); \ No newline at end of file diff --git a/libbozo/src/string/bzero.c b/libbozo/src/string/bzero.c new file mode 100644 index 0000000..e307235 --- /dev/null +++ b/libbozo/src/string/bzero.c @@ -0,0 +1,6 @@ +#include "string.h" + +void bzero(void *s, size_t n) +{ + memset(s, 0, n); +} \ No newline at end of file