util: introduce SQUARE macro

This commit is contained in:
Miroslav Lichvar
2018-08-17 11:16:44 +02:00
parent a1f2f17385
commit 0b709ab1bc
6 changed files with 15 additions and 30 deletions

2
util.h
View File

@@ -200,4 +200,6 @@ extern void UTI_GetRandomBytes(void *buf, unsigned int len);
/* Macro to clamp a value between two values */
#define CLAMP(min, x, max) (MAX((min), MIN((x), (max))))
#define SQUARE(x) ((x) * (x))
#endif /* GOT_UTIL_H */