labwc/include/common/bug-on.h

17 lines
530 B
C
Raw Normal View History

2020-07-31 21:31:03 +01:00
#ifndef __LABWC_BUG_ON_H
#define __LABWC_BUG_ON_H
2020-08-03 20:56:38 +01:00
/*
* BUG_ON - assert() without abort()
* @condition - expression to be evaluated
*/
2020-07-31 21:31:03 +01:00
#define BUG_ON(condition) \
do { \
if ((condition) != 0) { \
fprintf(stderr, "Badness in %s() at %s:%d\n", \
__func__, __FILE__, __LINE__); \
} \
} while (0)
2020-08-03 20:56:38 +01:00
#endif /* __LABWC_BUG_ON_H */