wok-6.x diff memtest/stuff/memtest86+-5.01-array-size.patch @ rev 20604

Up linux-libre (3.18.129)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Dec 17 23:42:42 2018 +0100 (2018-12-17)
parents
children d44f69067aca
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/memtest/stuff/memtest86+-5.01-array-size.patch	Mon Dec 17 23:42:42 2018 +0100
     1.3 @@ -0,0 +1,20 @@
     1.4 +--- memtest86+-5.01/controller.c~	2013-08-10 02:01:58.000000000 +0000
     1.5 ++++ memtest86+-5.01/controller.c	2013-12-12 20:58:12.873555378 +0000
     1.6 +@@ -292,7 +292,7 @@
     1.7 + 
     1.8 + 	/* First, locate the PCI bus where the MCH is located */
     1.9 + 
    1.10 +-	for(i = 0; i < sizeof(possible_nhm_bus); i++) {
    1.11 ++	for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
    1.12 + 		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
    1.13 + 		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
    1.14 + 		vid &= 0xFFFF;
    1.15 +@@ -327,7 +327,7 @@
    1.16 + 	ctrl.mode = ECC_NONE;
    1.17 + 
    1.18 + 	/* First, locate the PCI bus where the MCH is located */
    1.19 +-	for(i = 0; i < sizeof(possible_nhm_bus); i++) {
    1.20 ++	for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
    1.21 + 		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
    1.22 + 		pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
    1.23 + 		vid &= 0xFFFF;