From 310d423d36ae7bb6dac5a2ae2fb7b57bda72dcb5 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 24 Aug 2017 17:27:08 +0200 Subject: [PATCH 1/2] priv: Add macro for MAX Signed-off-by: Andreas Schneider (cherry picked from commit de35212789d11086621e176a11399de0d75ab3a6) Signed-off-by: Mihai Moldovan --- include/libssh/priv.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/libssh/priv.h b/include/libssh/priv.h index 5a74915e..c3373c00 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -263,6 +263,10 @@ int match_hostname(const char *host, const char *pattern, unsigned int len); #define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif +#ifndef MAX +#define MAX(a,b) ((a) > (b) ? (a) : (b)) +#endif + /** Free memory space */ #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0) -- 2.15.1