From: Krisztian Litkey Date: Thu, 11 Dec 2014 11:59:42 +0000 (+0200) Subject: common: allow printf-like formatted assert messages. X-Git-Tag: v0.0.68~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=224341b2f95683ee213e643ee900fcdb69cf770c;p=profile%2Fivi%2Fmurphy.git common: allow printf-like formatted assert messages. --- 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)