[Mesa-dev] [v7 3/9] intel: refactor planar format lookup

Chad Versace chad.versace at linux.intel.com
Fri Jul 19 11:46:05 PDT 2013


On 07/10/2013 01:24 AM, Topi Pohjolainen wrote:
> v2:
>     - refactor both occurences, not just one
>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>   src/mesa/drivers/dri/i965/intel_screen.c | 31 ++++++++++++++++++-------------
>   1 file changed, 18 insertions(+), 13 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
> index ce7a51e..e3ce505 100644
> --- a/src/mesa/drivers/dri/i965/intel_screen.c
> +++ b/src/mesa/drivers/dri/i965/intel_screen.c
> @@ -231,6 +231,21 @@ static struct intel_image_format intel_image_formats[] = {
>          { 0, 1, 0, __DRI_IMAGE_FORMAT_ARGB8888, 4 } } }
>   };
>
> +static struct intel_image_format *
> +intel_image_format_lookup(int fourcc)
> +{
> +   struct intel_image_format *f = 0;

The code convention throughout Mesa is to use NULL rather 0 for null pointers.
With that small fix, this patch is
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>


More information about the mesa-dev mailing list