[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] priv: Add macro for MAX


From: Andreas Schneider <asn@xxxxxxxxxxxxxx>

Signed-off-by: Andreas Schneider <asn@xxxxxxxxxxxxxx>
(cherry picked from commit de35212789d11086621e176a11399de0d75ab3a6)
---
 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


References:
[PATCH 0/2] Apply kex fixes with unknown algos to v0-7Mihai Moldovan <ionic@xxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org