summaryrefslogtreecommitdiff
path: root/slock/explicit_bzero.c
diff options
context:
space:
mode:
authordcc <dcc@logografos.com>2023-05-27 21:45:28 -0700
committerdcc <dcc@logografos.com>2023-05-27 21:45:28 -0700
commitbd4e72743ca24c0c380c221a6bc7376da1911f7e (patch)
tree192b6af99d8ef0d28ffa8a64504ceab77776bb26 /slock/explicit_bzero.c
downloaddcc-suckless-config-bd4e72743ca24c0c380c221a6bc7376da1911f7e.tar.gz
dcc-suckless-config-bd4e72743ca24c0c380c221a6bc7376da1911f7e.tar.bz2
dcc-suckless-config-bd4e72743ca24c0c380c221a6bc7376da1911f7e.zip
first
Diffstat (limited to 'slock/explicit_bzero.c')
-rwxr-xr-xslock/explicit_bzero.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/slock/explicit_bzero.c b/slock/explicit_bzero.c
new file mode 100755
index 0000000..3e33ca8
--- /dev/null
+++ b/slock/explicit_bzero.c
@@ -0,0 +1,19 @@
+/* $OpenBSD: explicit_bzero.c,v 1.3 2014/06/21 02:34:26 matthew Exp $ */
+/*
+ * Public domain.
+ * Written by Matthew Dempsky.
+ */
+
+#include <string.h>
+
+__attribute__((weak)) void
+__explicit_bzero_hook(void *buf, size_t len)
+{
+}
+
+void
+explicit_bzero(void *buf, size_t len)
+{
+ memset(buf, 0, len);
+ __explicit_bzero_hook(buf, len);
+}