summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2016-08-17 13:23:03 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2016-08-17 13:23:03 -0800
commitb0f08fc1e30daafb274181234dae3408fb2eb69b (patch)
tree63893387dc2b136342922d0d904f3e2d1a7e3ebd /util.c
parentdda0923eebd3d36a06ed4976cd4ab98d7cdec679 (diff)
Encryption support
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/util.c b/util.c
index 86b1120..8369d6b 100644
--- a/util.c
+++ b/util.c
@@ -487,3 +487,9 @@ struct bcache_handle bcache_fs_open(const char *path)
return ret;
}
+
+void memzero_explicit(void *buf, size_t len)
+{
+ void *(* volatile memset_s)(void *s, int c, size_t n) = memset;
+ memset_s(buf, 0, len);
+}