1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fixed assertions

git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@208 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
Steffen Vogel 2014-09-07 16:28:48 +00:00
parent ceddb27da6
commit 7096f974bb

View file

@ -18,7 +18,7 @@
#ifdef __GNUC__
#define EXPECT(x, v) __builtin_expect(x, v)
#else
#define EXPECT(x) (x)
#define EXPECT(x, v) (x)
#endif
/* Some color escape codes for pretty log messages */
@ -76,7 +76,7 @@ struct timespec timespec_rate(double rate);
/** Check assertion and exit if failed. */
#define assert(exp) do { \
if (EXPECT(exp, 0)) { \
if (EXPECT(!exp, 0)) { \
print(ERROR, "Assertion failed: '%s' in %s, %s:%d", \
#exp, __FUNCTION__, __BASE_FILE__, __LINE__); \
exit(EXIT_FAILURE); \