94
98
/* Multiplication of a count with an element size, with overflow check.
95
99
The count must be >= 0 and the element size must be > 0.
97
101
when N is of a wider type and N > SIZE_MAX. */
98
102
#define xtimes(N, ELSIZE) \
99
103
((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)