From 224341b2f95683ee213e643ee900fcdb69cf770c Mon Sep 17 00:00:00 2001 From: Krisztian Litkey Date: Thu, 11 Dec 2014 13:59:42 +0200 Subject: [PATCH] common: allow printf-like formatted assert messages. --- src/common/macros.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/macros.h b/src/common/macros.h index c58f180..bee5741 100644 --- 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) -- 2.7.4