95
95
/* Multiplication of a count with an element size, with overflow check.
96
96
The count must be >= 0 and the element size must be > 0.
97
97
This is a macro, not an inline function, so that it works correctly even
99
99
#define xtimes(N, ELSIZE) \
100
100
((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)