[haiku-commits] Re: haiku: hrev44150 - src/system/kernel/scheduler

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 14 May 2012 12:30:05 +0200 (CEST)

On May 13, 2012 at 7:07 PM fredrik.holmqvist@xxxxxxxxx wrote:
> -                add_timer(quantumTimer, &reschedule_event, quantum,
> -                        B_ONE_SHOT_RELATIVE_TIMER |
> B_TIMER_ACQUIRE_SCHEDULER_LOCK);
> +                if (!thread_is_idle_thread(nextThread))
> +                        add_timer(quantumTimer, &reschedule_event, quantum,
> +                                B_ONE_SHOT_RELATIVE_TIMER |
> B_TIMER_ACQUIRE_SCHEDULER_LOCK);

This adds a coding style violation to all files:
The add_timer() is a multi line statement, and thus it needs to be in a {}
block.

Bye,
   Axel.

Other related posts: