Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
In xbt_log_layout_simple_doit, add missing calls to check_overflow.
[simgrid.git] / src / xbt / xbt_log_layout_format.c
index f7ca02d..67ab93d 100644 (file)
@@ -204,10 +204,10 @@ static void xbt_log_layout_format_dynamic(xbt_log_layout_t l,
 
 #undef check_overflow
 #define check_overflow \
 
 #undef check_overflow
 #define check_overflow \
-  if (p-ev->buffer > XBT_LOG_BUFF_SIZE) { /* buffer overflow */ \
-  xbt_log_layout_format_dynamic(l,ev,msg_fmt,app); \
-  return;\
-  }
+  if (p - ev->buffer >= XBT_LOG_BUFF_SIZE) { /* buffer overflow */ \
+    xbt_log_layout_format_dynamic(l,ev,msg_fmt,app);               \
+    return;                                                        \
+  } else ((void)0)
 
 #define show_it(data,letter) \
   do { \
 
 #define show_it(data,letter) \
   do { \