[haiku-commits] r35659 - haiku/trunk/src/system/kernel/arch/x86

  • From: stefano.ceccherini@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 28 Feb 2010 18:16:29 +0100 (CET)

Author: jackburton
Date: 2010-02-28 18:16:29 +0100 (Sun, 28 Feb 2010)
New Revision: 35659
Changeset: http://dev.haiku-os.org/changeset/35659/haiku

Modified:
   haiku/trunk/src/system/kernel/arch/x86/arch_timer.cpp
Log:
Move variables declaration from start of function to where they are used.


Modified: haiku/trunk/src/system/kernel/arch/x86/arch_timer.cpp
===================================================================
--- haiku/trunk/src/system/kernel/arch/x86/arch_timer.cpp       2010-02-28 
16:42:22 UTC (rev 35658)
+++ haiku/trunk/src/system/kernel/arch/x86/arch_timer.cpp       2010-02-28 
17:16:29 UTC (rev 35659)
@@ -93,16 +93,13 @@
 int
 arch_init_timer(kernel_args *args)
 {
-       int i = 0;
-       timer_info *timer = NULL;
-       cpu_status state;
-
        // Sort timers by priority
        sort_timers(sTimers, (sizeof(sTimers) / sizeof(sTimers[0])) - 1);
 
-       state = disable_interrupts();
-
-       for (i = 0; (timer = sTimers[i]) != NULL; i++) {
+       timer_info *timer = NULL;
+       cpu_status state = disable_interrupts();
+       
+       for (int i = 0; (timer = sTimers[i]) != NULL; i++) {
                if (timer->init(args) == B_OK)
                        break;
        }


Other related posts:

  • » [haiku-commits] r35659 - haiku/trunk/src/system/kernel/arch/x86 - stefano . ceccherini