# HG changeset patch # User Matt Johnston # Date 1104685745 0 # Node ID bc4e3ac2dd5a67c98a779f97f3305fc96dae058b # Parent b4c6e7f276e9bf7aca756e8bc082b1298aaa35e4 make data pointers volatile so that memory zeroing won't get optimised away diff -r b4c6e7f276e9 -r bc4e3ac2dd5a zeromem.c --- 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;