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:
parent
ceddb27da6
commit
7096f974bb
1 changed files with 2 additions and 2 deletions
|
@ -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); \
|
||||
|
|
Loading…
Add table
Reference in a new issue