Redo r242889, now using the method from projects/amd64_xen_pv r240747.
Reminded by: kib MFC after: 3 days
This commit is contained in:
parent
3910bc633f
commit
9c715a0979
@ -58,11 +58,11 @@ __FBSDID("$FreeBSD$");
|
||||
#define TOSTRING(x) STRINGIFY(x)
|
||||
|
||||
/**
|
||||
* Writes an error message to buffer if cond is false, and returns true
|
||||
* iff the assertion failed. Note the implied parameters buffer and
|
||||
* Writes an error message to buffer if cond is false
|
||||
* Note the implied parameters buffer and
|
||||
* buflen
|
||||
*/
|
||||
#define XNB_ASSERT(cond) do { \
|
||||
#define XNB_ASSERT(cond) ({ \
|
||||
int passed = (cond); \
|
||||
char *_buffer = (buffer); \
|
||||
size_t _buflen = (buflen); \
|
||||
@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
|
||||
strlcat(_buffer, ":" TOSTRING(__LINE__) \
|
||||
" Assertion Error: " #cond "\n", _buflen); \
|
||||
} \
|
||||
} while (0)
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user