summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-06-12 21:10:33 +0200
committerVicent Marti <tanoku@gmail.com>2013-06-12 21:10:33 +0200
commit6de9b2ee14a2393fae3ed86c5a5d12712c83b083 (patch)
tree5fa21515d4ed0810b0dd35c6e6af1c8d1060e125 /src/util.c
parenteb58e2d0be4e07c2ef873a5f0562eaa90826c2de (diff)
downloadlibgit2-6de9b2ee14a2393fae3ed86c5a5d12712c83b083.tar.gz
util: It's called `memzero`
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index 248cf4c42..1d084daa8 100644
--- a/src/util.c
+++ b/src/util.c
@@ -723,12 +723,11 @@ void git__insertsort_r(
git__free(swapel);
}
-void git__memset(void *data, int c, size_t size)
+void git__memzero(volatile void *data, size_t size)
{
volatile uint8_t *scan = data;
uint8_t *end = scan + size;
- uint8_t val = (uint8_t)c;
while (scan < end)
- *scan++ = val;
+ *scan++ = 0x0;
}