[PATCH 0/4] BUG_RETURN_VAL macros

Chase Douglas chase.douglas at canonical.com
Tue May 15 08:36:57 PDT 2012


On 05/15/2012 03:26 AM, Peter Hutterer wrote:
> 
> I got annoyed having to write constructs like
> 
> BUG_WARN(foo);
> if (foo)
>     return FALSE;
> 
> and similar. glib has useful macros like g_return_if_fail and similar, these
> are macros that essentially do the same job. They shout into the log, but
> otherwise continue as normal.
> 
> http://developer.gnome.org/glib/2.29/glib-Warnings-and-Assertions.html#g-return-if-fail
> 
> These are not macros that should be used for handling normal out-of-scope
> values, they're there to shout that there is a real bug that needs fixing.

Looks good to me.

Reviewed-by: Chase Douglas <chase.douglas at canonical.com>


More information about the xorg-devel mailing list