Define a max macro (within a header) in utils.
This commit is contained in:
parent
cd6121019b
commit
023b14e194
|
@ -0,0 +1,8 @@
|
|||
/* Include gaurd. */
|
||||
#ifndef MAX_MACRO_H
|
||||
#define MAX_MACRO_H
|
||||
#define max(a,b) \
|
||||
({ __typeof__ (a) _a = (a); \
|
||||
__typeof__ (b) _b = (b); \
|
||||
_a > _b ? _a : _b; })
|
||||
#endif /* MAX_MACRO_H. */
|
Loading…
Reference in New Issue