[PATCH] exa: don't need to check for NULL pointer if we already assumed it has a value

Michel Dänzer michel at daenzer.net
Fri Apr 16 09:28:46 PDT 2010


On Fre, 2010-04-16 at 18:42 +0300, Tiago Vignatti wrote: 
> the alternative would be to check ps in the beginning of the function.
> 
> Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
> ---
>  exa/exa.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/exa/exa.c b/exa/exa.c
> index 590d9a5..51697bc 100644
> --- a/exa/exa.c
> +++ b/exa/exa.c
> @@ -779,14 +779,12 @@ exaCloseScreen(int i, ScreenPtr pScreen)
>      unwrap(pExaScr, pScreen, BitmapToRegion);
>      unwrap(pExaScr, pScreen, CreateScreenResources);
>  #ifdef RENDER
> -    if (ps) {
>  	unwrap(pExaScr, ps, Composite);
>  	if (pExaScr->SavedGlyphs)
>  	    unwrap(pExaScr, ps, Glyphs);
>  	unwrap(pExaScr, ps, Trapezoids);
>  	unwrap(pExaScr, ps, Triangles);
>  	unwrap(pExaScr, ps, AddTraps);
> -    }
>  #endif

I don't particularly care which alternative is picked, but if it's this
one, please fix up the indentation of the code that was in the if block.
With that fixed,

Acked-by: Michel Dänzer <michel at daenzer.net>


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the xorg-devel mailing list