projects
/
profile
/
ivi
/
murphy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acd84d1
)
common: allow printf-like formatted assert messages.
author
Krisztian Litkey
<krisztian.litkey@intel.com>
Thu, 11 Dec 2014 11:59:42 +0000
(13:59 +0200)
committer
Krisztian Litkey
<krisztian.litkey@intel.com>
Fri, 12 Dec 2014 15:37:33 +0000
(17:37 +0200)
src/common/macros.h
patch
|
blob
|
history
diff --git
a/src/common/macros.h
b/src/common/macros.h
index
c58f180
..
bee5741
100644
(file)
--- a/
src/common/macros.h
+++ b/
src/common/macros.h
@@
-113,10
+113,10
@@
/** Assertions. */
#ifndef NDEBUG
-# define MRP_ASSERT(expr,
msg) do {
\
+# define MRP_ASSERT(expr,
fmt, args...) do {
\
if (!(expr)) { \
- printf("assertion '%s' failed at %s@%s:%d:
%s\n", #expr,
\
- __FUNCTION__, __FILE__, __LINE__,
msg);
\
+ printf("assertion '%s' failed at %s@%s:%d:
"fmt"\n", #expr,
\
+ __FUNCTION__, __FILE__, __LINE__,
## args);
\
abort(); \
} \
} while (0)