[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haiku-commits
Subject:    [haiku-commits] r42782 - haiku/trunk/src/add-ons/accelerants/vesa
From:       axeld () pinc-software ! de
Date:       2011-09-29 22:47:46
Message-ID: 20110929224746.E01E769A04 () vmsvn ! haiku-os ! org
[Download RAW message or body]

Author: axeld
Date: 2011-09-30 00:47:46 +0200 (Fri, 30 Sep 2011)
New Revision: 42782
Changeset: https://dev.haiku-os.org/changeset/42782

Modified:
   haiku/trunk/src/add-ons/accelerants/vesa/mode.cpp
Log:
* Minor cleanup.


Modified: haiku/trunk/src/add-ons/accelerants/vesa/mode.cpp
===================================================================
--- haiku/trunk/src/add-ons/accelerants/vesa/mode.cpp	2011-09-29 22:46:35 UTC (rev 42781)
+++ haiku/trunk/src/add-ons/accelerants/vesa/mode.cpp	2011-09-29 22:47:46 UTC (rev 42782)
@@ -76,17 +76,16 @@
 	const color_space kVesaSpaces[] = {B_RGB32_LITTLE, B_RGB24_LITTLE,
 		B_RGB16_LITTLE, B_RGB15_LITTLE, B_CMAP8};
 
-	display_mode* initialModes = NULL;
 	uint32 initialModesCount = 0;
 
 	// Add initial VESA modes.
-	initialModes = (display_mode*)malloc(
+	display_mode* initialModes = (display_mode*)malloc(
 		sizeof(display_mode) * gInfo->shared_info->vesa_mode_count);
 	if (initialModes != NULL) {
 		initialModesCount = gInfo->shared_info->vesa_mode_count;
 		vesa_mode* vesaModes = gInfo->vesa_modes;
 
-		for (uint32 i = gInfo->shared_info->vesa_mode_count; i-- > 0;) {
+		for (uint32 i = 0; i < initialModesCount; i++) {
 			compute_display_timing(vesaModes[i].width, vesaModes[i].height,
 				60, false, &initialModes[i].timing);
 			fill_display_mode(vesaModes[i].width, vesaModes[i].height,


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic