The call to dm_stats_walk_start() before the do statement makes
dm_stats_walk_do() behave inconsistently depending on context;
wrap them in an additional do { } while (0) so that the macro
always expands to a valid statement.
* empty.
*/
#define dm_stats_walk_do(dms) \
-dm_stats_walk_start((dms)); \
-do
+do { \
+ dm_stats_walk_start((dms)); \
+ do
/*
* Start a 'while' style loop or end a 'do..while' loop iterating over the
* regions contained in dm_stats handle 'dms'.
*/
#define dm_stats_walk_while(dms) \
-while(!dm_stats_walk_end((dms)))
+ while(!dm_stats_walk_end((dms))); \
+} while (0)
/*
* Cursor relative property methods