All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] add missing braces around FOR_EACH_PTR loop
@ 2017-02-17  0:23 Luc Van Oostenryck
  0 siblings, 0 replies; only message in thread
From: Luc Van Oostenryck @ 2017-02-17  0:23 UTC (permalink / raw)
  To: linux-sparse; +Cc: Christopher Li, Luc Van Oostenryck, Oleg Nesterov

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 --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;
-- 
2.11.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-17  0:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-17  0:23 [PATCH] add missing braces around FOR_EACH_PTR loop Luc Van Oostenryck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.