xref: /illumos-gate/usr/src/common/util/explicit_bzero.c (revision ed093b41a93e8563e6e1e5dae0768dda2a7bcc27)
1 /*	$OpenBSD: explicit_bzero.c,v 1.3 2014/06/21 02:34:26 matthew Exp $ */
2 /*
3  * Public domain.
4  * Written by Matthew Dempsky.
5  */
6 
7 #include <string.h>
8 
9 #pragma weak __explicit_bzero_hook
10 
11 void
12 __explicit_bzero_hook(void *buf __unused, size_t len __unused)
13 {
14 }
15 
16 void
17 explicit_bzero(void *buf, size_t len)
18 {
19 	(void) memset(buf, 0, len);
20 	__explicit_bzero_hook(buf, len);
21 }
22