mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] common: fix macro WARN
@ 2014-05-12 15:57 Christoph Fritz
  2014-05-13  8:28 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Fritz @ 2014-05-12 15:57 UTC (permalink / raw)
  To: barebox


Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
 include/common.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/common.h b/include/common.h
index bfd3ce8..e7ab5fe 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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
-- 
1.7.10.4



_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] common: fix macro WARN
  2014-05-12 15:57 [PATCH] common: fix macro WARN Christoph Fritz
@ 2014-05-13  8:28 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2014-05-13  8:28 UTC (permalink / raw)
  To: Christoph Fritz; +Cc: barebox

On Mon, May 12, 2014 at 05:57:32PM +0200, Christoph Fritz wrote:
> 
> Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>

Applied, thanks

Sascha

> ---
>  include/common.h |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/common.h b/include/common.h
> index bfd3ce8..e7ab5fe 100644
> --- a/include/common.h
> +++ b/include/common.h
> @@ -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
> -- 
> 1.7.10.4
> 
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-13  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-12 15:57 [PATCH] common: fix macro WARN Christoph Fritz
2014-05-13  8:28 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox