BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / c629653991780509799e2e00d3b074dc0e0ef313 / lib

// Related

Nucleus

Barry Initial commit c629653 (3 years, 3 months ago)
diff --git a/lib/mem.c b/lib/mem.c
new file mode 100644
index 0000000..a41ec26
--- /dev/null
+++ b/lib/mem.c
@@ -0,0 +1,13 @@
+#include <stddef.h>
+
+/* Fill a region of memory with specified byte */
+void *
+memset(void *dest, int byte, size_t len)
+{
+	unsigned char *a = dest;
+	if (len > 0) {
+		while (len-- > 0)
+			*a++ = byte;
+	}
+	return dest;
+}