lkml.org 
[lkml]   [2005]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 3/2] drivers/char/vt.c: remove unnecessary code
On Mon, 28 Feb 2005 15:02:32 +0100, Arjan van de Ven
<arjan@infradead.org> wrote:
> \
> > > >> + for(npar = NPAR-1; npar < NPAR; npar--)
> > >
> > > >How many times do you want this for loop to run?
> > >
> > > NPAR times :-). As I stated, npar is unsigned.
> > >
> >
> > for (npar = NPAR - 1; npar >= 0; npar--)
> >
> > would be more readable and may be even faster on a dumb compiler than
> > your variant. Still, I'd have compiler worry about such
> > micro-optimizations.
>
> actually that goes wrong for npar unsigned...
>
>

Oops, you are right...

--
Dmitry
-
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 14:10    [W:0.101 / U:0.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site