core: added assert to cib_init()

pr/gpio
IldarValiev 8 years ago committed by Oleg Hahm
parent a8391e346e
commit 475b1af26d

@ -51,6 +51,9 @@ typedef struct {
*/
static inline void cib_init(cib_t *__restrict cib, unsigned int size)
{
/* check if size is a power of 2 by comparing it to its complement */
assert(!(size & (size - 1)));
cib_t c = CIB_INIT(size);
*cib = c;
}

Loading…
Cancel
Save