summaryrefslogtreecommitdiffstats
path: root/src/utils.h
blob: a7f835330793c246a74ddeab3ae3acaa9f1ab958 (plain)
1
2
3
4
5
6
7
8
9
10
11
#ifndef UTILS_H
#define UTILS_H

#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x)	(sizeof(x) / sizeof((x)[0]))
#endif

#define mint(x,y)	({(void)(&x == &y); x < y ? x : y; })
#define maxt(x,y)	({(void)(&x == &y); x < y ? y : x; })

#endif