aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--elf/loadtest.c16
2 files changed, 12 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ed7f08..ce38369 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2017-06-27 Joseph Myers <joseph@codesourcery.com>
+ * elf/loadtest.c (OUT): Define using do { } while (0).
+
* time/strftime_l.c (DO_NUMBER): Define using do { } while (0).
(DO_NUMBER_SPACEPAD): Likewise.
diff --git a/elf/loadtest.c b/elf/loadtest.c
index 727469b..b5eab5e 100644
--- a/elf/loadtest.c
+++ b/elf/loadtest.c
@@ -72,12 +72,16 @@ static const struct
#define MAPS ((struct link_map *) _r_debug.r_map)
-#define OUT \
- for (map = MAPS; map != NULL; map = map->l_next) \
- if (map->l_type == lt_loaded) \
- printf ("name = \"%s\", direct_opencount = %d\n", \
- map->l_name, (int) map->l_direct_opencount); \
- fflush (stdout)
+#define OUT \
+ do \
+ { \
+ for (map = MAPS; map != NULL; map = map->l_next) \
+ if (map->l_type == lt_loaded) \
+ printf ("name = \"%s\", direct_opencount = %d\n", \
+ map->l_name, (int) map->l_direct_opencount); \
+ fflush (stdout); \
+ } \
+ while (0)
int