Fix MIN/MAX macros

Expressions like "x < MAX(y, z)" were broken.
This commit is contained in:
Romain Vimont 2023-02-28 23:52:26 +01:00
parent 3c3c07db05
commit 389dd77b50
1 changed files with 2 additions and 2 deletions

View File

@ -5,8 +5,8 @@
#include "compat.h"
#define ARRAY_LEN(a) (sizeof(a) / sizeof(a[0]))
#define MIN(X,Y) (X) < (Y) ? (X) : (Y)
#define MAX(X,Y) (X) > (Y) ? (X) : (Y)
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
#define CLAMP(V,X,Y) MIN( MAX((V),(X)), (Y) )
#define container_of(ptr, type, member) \