--- pgp/src/usuals.h 2018/04/24 16:39:35 1.1.1.3 +++ pgp/src/usuals.h 2018/04/24 16:40:27 1.1.1.4 @@ -20,8 +20,8 @@ typedef unsigned long word32; /* values #endif /* if TRUE not already defined */ #ifndef min /* if min macro not already defined */ -#define min(a,b) ( (a)<(b) ? (a) : (b) ) -#define max(a,b) ( (a)>(b) ? (a) : (b) ) +#define min(a,b) (((a)<(b)) ? (a) : (b) ) +#define max(a,b) (((a)>(b)) ? (a) : (b) ) #endif /* if min macro not already defined */ /* void for use in pointers */ @@ -31,5 +31,11 @@ typedef unsigned long word32; /* values #define VOID char #endif -#endif /* if USUALS not already defined */ + /* Zero-fill the byte buffer. */ +#define fill0(buffer,count) memset( buffer, 0, count ) + + /* This macro is for burning sensitive data. Many of the + file I/O routines use it for zapping buffers */ +#define burn(x) fill0((VOID *)&(x),sizeof(x)) +#endif /* if USUALS not already defined */