Bug fix https://bugs.freedesktop.org/show_bug.cgi?id=96937

Michel Dänzer michel at daenzer.net
Thu Jul 21 06:31:49 UTC 2016


On 21.07.2016 12:51, Deng, Emily wrote:
> 
>      As title. Thanks.

Please send patches inline, preferably using git send-email.


> From: jqdeng <Emily.Deng at amd.com>

Might be nice if the Git author information has your full name, but
that's just cosmetic, not a big deal.


> Subject: [PATCH] Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=96937

Please write a proper commit log:

A single line shortlog summarizing what the change does, e.g.

xfree86: vgaarb: Initialize local variable rsrc_decodes

Then one or several paragraphs describing the problem and the solution,
and finally

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96937

to reference the bug report.


> diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c
> index 5cc2429..0a3d6c6 100644
> --- a/hw/xfree86/common/xf86VGAarbiter.c
> +++ b/hw/xfree86/common/xf86VGAarbiter.c
> @@ -105,7 +105,7 @@ Bool
>  xf86VGAarbiterAllowDRI(ScreenPtr pScreen)
>  {
>      int vga_count;
> -    int rsrc_decodes;
> +    int rsrc_decodes = 0;
>      ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
>  
>      if (vga_no_arb)

Out of curiosity, why is pScrn->vgaDev == NULL in this case?

Anyway, the code change looks good to me.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list