[m-rev.] diff: fix MR_table_assert macro

Julien Fischer jfischer at opturion.com
Fri Mar 21 15:03:07 AEDT 2014


Fix compilation of runtime when MR_TABLE_DEBUG is defined.

runtime/mercury_tabling.c:
 	Fix the broken definition for the MR_table_assert macro.

Julien.

diff --git a/runtime/mercury_tabling.c b/runtime/mercury_tabling.c
index 0c3fc25..0c2178e 100644
--- a/runtime/mercury_tabling.c
+++ b/runtime/mercury_tabling.c
@@ -30,7 +30,7 @@ static  void    MR_table_assert_failed(const char *file, unsigned line);
          if (! (cond)) {                                                     \
              MR_table_assert_failed(__FILE__, __LINE__);                     \
          }                                                                   \
-    }
+    } while (0)
  #else
  #define MR_table_assert(cond)  ((void) 0)
  #endif





More information about the reviews mailing list