Fix MIN/MAX macros
Expressions like "x < MAX(y, z)" were broken.
This commit is contained in:
parent
3c3c07db05
commit
389dd77b50
1 changed files with 2 additions and 2 deletions
|
@ -5,8 +5,8 @@
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
|
||||||
#define ARRAY_LEN(a) (sizeof(a) / sizeof(a[0]))
|
#define ARRAY_LEN(a) (sizeof(a) / sizeof(a[0]))
|
||||||
#define MIN(X,Y) (X) < (Y) ? (X) : (Y)
|
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
|
||||||
#define MAX(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 CLAMP(V,X,Y) MIN( MAX((V),(X)), (Y) )
|
||||||
|
|
||||||
#define container_of(ptr, type, member) \
|
#define container_of(ptr, type, member) \
|
||||||
|
|
Loading…
Reference in a new issue