diff zeromem.c @ 162:bc4e3ac2dd5a libtomcrypt

make data pointers volatile so that memory zeroing won't get optimised away
author Matt Johnston <matt@ucc.asn.au>
date Sun, 02 Jan 2005 17:09:05 +0000
parents d7da3b1e1540
children
line wrap: on
line diff
--- a/zeromem.c	Mon Dec 20 14:46:40 2004 +0000
+++ b/zeromem.c	Sun Jan 02 17:09:05 2005 +0000
@@ -12,7 +12,7 @@
 
 void zeromem(void *dst, size_t len)
 {
- unsigned char *mem = (unsigned char *)dst;
+ volatile unsigned char *mem = (unsigned char *)dst;
  _ARGCHK(dst != NULL);
  while (len-- > 0)
     *mem++ = 0;