[Openchrome-devel] Unitialize variable fix

Xavier Bachelot xavier
Sat Apr 25 09:42:16 PDT 2009


Bartosz Kosiorek wrote:
> Hello.
> I fixed bug whitch was introduced in r476. Someone copy one part of
> code and then apeared unitialized value.
> I have tested this fix and it's works perfectly. I also tested
> previous patch which I send previously.
> 
> Could You send this patch to repository?
> 
> Best Regards
> Bartosz Kosiorek
> 
> Here some details:
> 
> Index: src/via_driver.c
> ===================================================================
> --- src/via_driver.c	(wersja 740)
> +++ src/via_driver.c	(kopia robocza)
> @@ -1153,6 +1153,8 @@
>      struct pci_device *vgaDevice = viaPciDeviceVga();
>  #endif
> 
> +    hwp = VGAHWPTR(pScrn);
> +
>      switch (pVia->Chipset) {
>          case VIA_CLE266:
>          case VIA_KM400:
> @@ -1546,7 +1548,6 @@
>          VIAFreeRec(pScrn);
>          return FALSE;
>      }
> -    hwp = VGAHWPTR(pScrn);
> 
>  #ifdef HAVE_DEBUG
>      //pVia->PrintVGARegs = FALSE;
> @@ -2266,10 +2267,10 @@
>          case VIA_CX700:
>          case VIA_P4M900:
>          case VIA_VX800:
> -            ViaSeqMask(VGAHWPTR(pScrn), 0x1A, 0x00, 0x08);
> +            ViaSeqMask(hwp, 0x1A, 0x00, 0x08);
>              break;
>          default:
> -            ViaSeqMask(VGAHWPTR(pScrn), 0x1A, 0x00, 0x60);
> +            ViaSeqMask(hwp, 0x1A, 0x00, 0x60);
>              break;
>      }
>  }
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Openchrome-devel mailing list
> Openchrome-devel at openchrome.org
> http://wiki.openchrome.org/mailman/listinfo/openchrome-devel

Both fixes committed, thanks.

Regards,
Xavier





More information about the Openchrome-devel mailing list