mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
* util.h: Add wipememory2() macro (same as wipememory, but can specify the
byte to wipe with).
This commit is contained in:
parent
c4d58f14e0
commit
d941240b45
@ -1,3 +1,8 @@
|
|||||||
|
2002-11-06 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* util.h: Add wipememory2() macro (same as wipememory, but can
|
||||||
|
specify the byte to wipe with).
|
||||||
|
|
||||||
2002-10-31 Stefan Bellon <sbellon@sbellon.de>
|
2002-10-31 Stefan Bellon <sbellon@sbellon.de>
|
||||||
|
|
||||||
* util.h [__riscos__]: Prefixed all RISC OS prototypes with
|
* util.h [__riscos__]: Prefixed all RISC OS prototypes with
|
||||||
|
@ -261,7 +261,8 @@ int vasprintf ( char **result, const char *format, va_list args);
|
|||||||
#define DIM(v) (sizeof(v)/sizeof((v)[0]))
|
#define DIM(v) (sizeof(v)/sizeof((v)[0]))
|
||||||
#define DIMof(type,member) DIM(((type *)0)->member)
|
#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 ***********/
|
/******* RISC OS stuff ***********/
|
||||||
#ifdef __riscos__
|
#ifdef __riscos__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user