From: David Miller <davem@davemloft.net>
To: roel.kluin@gmail.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] netdevice: ticks reaches 25, not 26.
Date: Mon, 09 Feb 2009 17:57:14 -0800 (PST) [thread overview]
Message-ID: <20090209.175714.70463534.davem@davemloft.net> (raw)
In-Reply-To: <4990AC93.3080906@gmail.com>
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.
next prev parent reply other threads:[~2009-02-10 1:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-09 22:22 [PATCH] netdevice: ticks reaches 25, not 26 Roel Kluin
2009-02-10 1:57 ` David Miller [this message]
2009-02-10 8:50 ` Jarek Poplawski
2009-02-10 8:59 ` David Miller
2009-02-10 9:19 ` Roel Kluin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090209.175714.70463534.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=roel.kluin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.