avassert: prettify macro
authorMåns Rullgård <mans@mansr.com>
Fri, 1 Oct 2010 13:55:16 +0000 (13:55 +0000)
committerMåns Rullgård <mans@mansr.com>
Fri, 1 Oct 2010 13:55:16 +0000 (13:55 +0000)
Originally committed as revision 25285 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavutil/avassert.h

index fe307fa..25f24a6 100644 (file)
 /**
  * assert() equivalent, that is always enabled.
  */
-#define av_assert0(cond) do {if(!(cond)) { av_log(NULL, AV_LOG_FATAL, "Assertion %s failed at %s:%d\n", AV_STRINGIFY(cond), __FILE__, __LINE__); abort(); }}while(0)
+#define av_assert0(cond) do {                                           \
+    if (!(cond)) {                                                      \
+        av_log(NULL, AV_LOG_FATAL, "Assertion %s failed at %s:%d\n",    \
+               AV_STRINGIFY(cond), __FILE__, __LINE__);                 \
+        abort();                                                        \
+    }                                                                   \
+} while (0)
 
 
 /**