|
@@ -180,11 +180,13 @@ typedef void (interrupt_handler_t)(void *);
|
|
|
* General Purpose Utilities
|
|
|
*/
|
|
|
#define min(X, Y) \
|
|
|
- ({ typeof (X) __x = (X), __y = (Y); \
|
|
|
+ ({ typeof (X) __x = (X); \
|
|
|
+ typeof (Y) __y = (Y); \
|
|
|
(__x < __y) ? __x : __y; })
|
|
|
|
|
|
#define max(X, Y) \
|
|
|
- ({ typeof (X) __x = (X), __y = (Y); \
|
|
|
+ ({ typeof (X) __x = (X); \
|
|
|
+ typeof (Y) __y = (Y); \
|
|
|
(__x > __y) ? __x : __y; })
|
|
|
|
|
|
#define MIN(x, y) min(x, y)
|