Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/string/explicit_bzero.c')
-rw-r--r--newlib/libc/string/explicit_bzero.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/newlib/libc/string/explicit_bzero.c b/newlib/libc/string/explicit_bzero.c
new file mode 100644
index 000000000..5124df23c
--- /dev/null
+++ b/newlib/libc/string/explicit_bzero.c
@@ -0,0 +1,16 @@
+/* $OpenBSD: explicit_bzero.c,v 1.2 2014/06/10 04:17:37 deraadt Exp $ */
+/*
+ * Public domain.
+ * Written by Ted Unangst
+ */
+
+#include <string.h>
+
+/*
+ * explicit_bzero - don't let the compiler optimize away bzero
+ */
+void
+explicit_bzero(void *p, size_t n)
+{
+ bzero(p, n);
+}