lkml.org 
[lkml]   [2002]   [Aug]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
FromDaniel Phillips <>
SubjectRe: [PATCH] sched.c
DateWed, 28 Aug 2002 02:47:24 +0200
On Wednesday 28 August 2002 02:13, Daniel Phillips wrote:
> On Tuesday 27 August 2002 20:35, Andrew Morton wrote:
> > Lahti Oy wrote:
> > > - for (i = 0; i < NR_CPUS; i++)
> > > + for (i = NR_CPUS; i; i--)
> > >    sum += cpu_rq(i)->nr_running;
> > 
> > Off-by-one there.  You'd want
> > 
> > 	for (i = NR_CPUS; --i >= 0; )
> > 
> > or something similarly foul ;)
> 
> 	int i = NR_CPUS;
> 
> 	while (--i)

Err, i--

-- 
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:22    [from the cache]
©2003-2008