mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-11 07:13:20 +00:00
Define side-effect-safe MIN and MAX macros and remove duplicate definitions from various files.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -222,6 +222,11 @@ void ast_sha1_hash(char *output, const char *input);
|
||||
|
||||
int ast_base64encode_full(char *dst, const unsigned char *src, int srclen, int max, int linebreaks);
|
||||
|
||||
#undef MIN
|
||||
#define MIN(a, b) ({ typeof(a) __a = (a); typeof(b) __b = (b); ((__a > __b) ? __b : __a);})
|
||||
#undef MAX
|
||||
#define MAX(a, b) ({ typeof(a) __a = (a); typeof(b) __b = (b); ((__a < __b) ? __b : __a);})
|
||||
|
||||
/*!
|
||||
* \brief Encode data in base64
|
||||
* \param dst the destination buffer
|
||||
|
Reference in New Issue
Block a user