As I said in the commit message, why is the alternative logging 
mechanism even there? Shouldn't it be removed and we just always rely on 
eina log?

--
Tom.

On 22/06/15 15:40, Tom Hacohen wrote:
> tasn pushed a commit to branch master.
>
> http://git.enlightenment.org/core/enlightenment.git/commit/?id=ba82d226929434eef20908a0a4bde5e5a2ba140f
>
> commit ba82d226929434eef20908a0a4bde5e5a2ba140f
> Author: Tom Hacohen <t...@stosb.com>
> Date:   Mon Jun 22 15:37:13 2015 +0100
>
>      Logging: Fix broken logging macros.
>
>      This is macro 101, you don't EVER put multiple statements in a macro
>      like that.
>      See Chris's commits, these broken macros already introduced (subtle)
>      bugs. Always surround macros in "do {} while()" unless you absolutely
>      can't (like when you declare a new variable to be used in the scope).
>
>      Why is it even there? I think we can safely assume eina log is available
>      for usage in E...
>
>      @fix
> ---
>   src/bin/e_log.h | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/src/bin/e_log.h b/src/bin/e_log.h
> index 4100780..325539f 100644
> --- a/src/bin/e_log.h
> +++ b/src/bin/e_log.h
> @@ -27,11 +27,11 @@ EINTERN int e_log_shutdown(void);
>   #undef WRN
>   #undef ERR
>   #undef CRI
> -#define DBG(...)            printf(__VA_ARGS__); putc('\n', stdout)
> -#define INF(...)            printf(__VA_ARGS__); putc('\n', stdout)
> -#define WRN(...)            printf(__VA_ARGS__); putc('\n', stdout)
> -#define ERR(...)            printf(__VA_ARGS__); putc('\n', stdout)
> -#define CRI(...)            printf(__VA_ARGS__); putc('\n', stdout)
> +#define DBG(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } 
> while(0)
> +#define INF(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } 
> while(0)
> +#define WRN(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } 
> while(0)
> +#define ERR(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } 
> while(0)
> +#define CRI(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } 
> while(0)
>   #endif
>
>   #endif
>


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to