Define Macros MAX and MIN

This commit is contained in:
Axel Wagner 2010-09-17 01:16:53 +02:00
parent 4d38bf81ba
commit 4ec3e7a619
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,10 @@
#include "queue.h" #include "queue.h"
/* Get the maximum/minimum of x and y */
#define MAX(x,y) ((x) > (y) ? (x) : (y))
#define MIN(x,y) ((x) < (y) ? (x) : (y))
/* Securely free p */ /* Securely free p */
#define FREE(p) do { \ #define FREE(p) do { \
if (p != NULL) { \ if (p != NULL) { \