Add min and max macros.

This commit is contained in:
Andreas Schneider 2009-01-22 14:43:37 +01:00
parent eca50e32a6
commit 228a19abf4

View file

@ -78,6 +78,12 @@
/** Free memory and zero the pointer */
#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
/** Get the smaller value */
#define MIN(a,b) ((a) < (b) ? (a) : (b))
/** Get the bigger value */
#define MAX(a,b) ((a) < (b) ? (b) : (a))
/**
* }@
*/