diff mbox

add missing braces around FOR_EACH_PTR loop

Message ID 20170217002332.12245-1-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

Luc Van Oostenryck Feb. 17, 2017, 12:23 a.m. UTC
Stricto sensu, these braces are not needed but are used
everywhere else around FOR_EACH_PTR and friends loops.
Their lack can also bite you when doing experiments with
the ptrlist macros ...

CC: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 dissect.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/dissect.c b/dissect.c
index 67428ec64..5f067eb4c 100644
--- a/dissect.c
+++ b/dissect.c
@@ -541,7 +541,7 @@  static struct symbol *do_initializer(struct symbol *type, struct expression *exp
 
 	break; case EXPR_INITIALIZER:
 		m_addr = 0;
-		FOR_EACH_PTR(expr->expr_list, m_expr)
+		FOR_EACH_PTR(expr->expr_list, m_expr) {
 			if (type->type == SYM_ARRAY) {
 				m_type = base_type(type);
 				if (m_expr->type == EXPR_INDEX)
@@ -567,7 +567,7 @@  static struct symbol *do_initializer(struct symbol *type, struct expression *exp
 			}
 			do_initializer(m_type, m_expr);
 			m_addr++;
-		END_FOR_EACH_PTR(m_expr);
+		} END_FOR_EACH_PTR(m_expr);
 	}
 
 	return type;