[PATCH] common: fix macro WARN

Sascha Hauer s.hauer at pengutronix.de
Tue May 13 01:28:46 PDT 2014


On Mon, May 12, 2014 at 05:57:32PM +0200, Christoph Fritz wrote:
> 
> Signed-off-by: Christoph Fritz <chf.fritz at 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 at 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 |



More information about the barebox mailing list