[PATCH] add missing braces around FOR_EACH_PTR loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux