aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2002-11-06 17:38:09 +0000
committerDavid Shaw <[email protected]>2002-11-06 17:38:09 +0000
commitd941240b45b3147ca9041e130ffcbc90b70dc46e (patch)
tree8da656afddae0b6f30112ce09a33cd9c846abe90
parent* rndw32.c [__CYGWIN32__]: Don't include winioctl.h - it is not required (diff)
downloadgnupg-d941240b45b3147ca9041e130ffcbc90b70dc46e.tar.gz
gnupg-d941240b45b3147ca9041e130ffcbc90b70dc46e.zip
* util.h: Add wipememory2() macro (same as wipememory, but can specify the
byte to wipe with).
Diffstat (limited to '')
-rw-r--r--include/ChangeLog5
-rw-r--r--include/util.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index aee6dfe25..ca286274c 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-06 David Shaw <[email protected]>
+
+ * util.h: Add wipememory2() macro (same as wipememory, but can
+ specify the byte to wipe with).
+
2002-10-31 Stefan Bellon <[email protected]>
* util.h [__riscos__]: Prefixed all RISC OS prototypes with
diff --git a/include/util.h b/include/util.h
index b163b0533..48010157e 100644
--- a/include/util.h
+++ b/include/util.h
@@ -261,7 +261,8 @@ int vasprintf ( char **result, const char *format, va_list args);
#define DIM(v) (sizeof(v)/sizeof((v)[0]))
#define DIMof(type,member) DIM(((type *)0)->member)
-#define wipememory(_ptr,_len) do { volatile char *_vptr=(volatile char *)(_ptr); size_t _vlen=(_len); while(_vlen) { *_vptr=0; _vptr++; _vlen--; } } while(0)
+#define wipememory2(_ptr,_set,_len) do { volatile char *_vptr=(volatile char *)(_ptr); size_t _vlen=(_len); while(_vlen) { *_vptr=(_set); _vptr++; _vlen--; } } while(0)
+#define wipememory(_ptr,_len) wipememory2(_ptr,0,_len)
/******* RISC OS stuff ***********/
#ifdef __riscos__