Skip to contentSkip to conversation

common: fix macro WARN

PATCH Applied Christoph Fritz 2 participants 2 messages May 12, 2014 – May 13, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common: fix macro WARN

---
 include/common.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/common.h +2 -1
index bfd3ce8..e7ab5fe 100644
@@ -72,10 +72,11 @@
 #ifndef WARN
 #define WARN(condition, format...) ({					\
 	int __ret_warn_on = !!(condition);				\
-	if (unlikely(__ret_warn_on))					\
+	if (unlikely(__ret_warn_on)) {					\
 		__WARN();						\
 		puts("WARNING: ");					\
 		printf(format);						\
+	}								\
 	unlikely(__ret_warn_on);					\
 })
 #endif
Signature · 8 lines
1.7.10.4



_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 2 lines · Christoph Fritz

Applied, thanks

Sascha

Quoted 31 lines
---
 include/common.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/common.h +2 -1
index bfd3ce8..e7ab5fe 100644
@@ -72,10 +72,11 @@
 #ifndef WARN
 #define WARN(condition, format...) ({					\
 	int __ret_warn_on = !!(condition);				\
-	if (unlikely(__ret_warn_on))					\
+	if (unlikely(__ret_warn_on)) {					\
 		__WARN();						\
 		puts("WARNING: ");					\
 		printf(format);						\
+	}								\
 	unlikely(__ret_warn_on);					\
 })
 #endif
Signature · 8 lines
1.7.10.4



_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox