lkml.org 
[lkml]   [2009]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] netdevice: ticks reaches 25, not 26.
On 10-02-2009 02:57, David Miller wrote:
> From: Roel Kluin <roel.kluin@gmail.com>
> Date: Mon, 09 Feb 2009 23:22:11 +0100
>
>> With while (tick++ < 25) { ... } ticks reaches 25, not 26.
>
> Does it?
>
> --------------------
> #include <stdio.h>
> int main(void)
> {
> int i = 0;
> while (i++ < 25)
> ;
> printf("%d\n", i);
>
> return 0;
> }
> --------------------
> davem@sunset:~/src/GIT/linux-2.6$ gcc -O2 -o x x.c
> davem@sunset:~/src/GIT/linux-2.6$ ./x
> 26
> davem@sunset:~/src/GIT/linux-2.6$
>
> I'm getting extremely tired of these "off by one" patches, to be
> honest with you.

So, what other C feature do you find a better source of joy now?

Jarek P.


\
 
 \ /
  Last update: 2009-02-10 09:53    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog