[Openchrome-devel] Unitialize variable fix

Bartosz Kosiorek gang65
Fri Mar 27 12:34:30 PDT 2009


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;
     }
 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hwp.patch
Type: application/octet-stream
Size: 909 bytes
Desc: not available
Url : http://wiki.openchrome.org/pipermail/openchrome-devel/attachments/20090327/2bf738bc/hwp.obj



More information about the Openchrome-devel mailing list