aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-05-14 19:46:14 +0200
committerMattias Andrée <m@maandree.se>2026-05-14 19:46:14 +0200
commit5660c556a06916c2f1e004f7f8d5e368b3a88e25 (patch)
tree562217dbfa5f33ee7a73f6bdfc3b67dc9245b4d9 /common.h
parentFix test bug only found with musl+clang (diff)
downloadlibrecrypt-5660c556a06916c2f1e004f7f8d5e368b3a88e25.tar.gz
librecrypt-5660c556a06916c2f1e004f7f8d5e368b3a88e25.tar.bz2
librecrypt-5660c556a06916c2f1e004f7f8d5e368b3a88e25.tar.xz
Clean up
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/common.h b/common.h
index 1c41d21..f64399a 100644
--- a/common.h
+++ b/common.h
@@ -63,6 +63,16 @@
*/
#define ELEMSOF(ARRAY) (sizeof(ARRAY) / sizeof(*(ARRAY)))
+/**
+ * Select the minimum of two values
+ */
+#define MIN(A, B) ((A) < (B) ? (A) : (B))
+
+/**
+ * Select the maximum of two values
+ */
+#define MAX(A, B) ((A) > (B) ? (A) : (B))
+
#include "algorithms.h"