]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
contrib/macros: allow mutually nested MIN(MAX(...))
authorLibor Peltan <libor.peltan@nic.cz>
Tue, 9 Sep 2025 07:07:44 +0000 (09:07 +0200)
committerDavid Vašek <david.vasek@nic.cz>
Thu, 11 Sep 2025 15:42:19 +0000 (17:42 +0200)
src/contrib/macros.h

index e00d18658839fdb23de3268e78aad9f61dd1f37a..fc46c981070caf0eec2ed5bd21594a27f83370b9 100644 (file)
@@ -16,7 +16,7 @@
 
 /*! \brief Type-safe maximum macro. */
 #define MAX(a, b) \
-       ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a > _b ? _a : _b; })
+       ({ __typeof__ (a) _x = (a); __typeof__ (b) _y = (b); _x > _y ? _x : _y; })
 #endif
 
 #ifndef likely