netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: netdev <netdev@vger.kernel.org>, Jiri Benc <jbenc@suse.cz>
Subject: Re: d80211: clean up some list and loop code
Date: Fri, 17 Nov 2006 00:37:40 +0100	[thread overview]
Message-ID: <1163720260.3392.24.camel@johannes.berg> (raw)
In-Reply-To: <20061116232455.GA3297@tuxdriver.com>

[-- Attachment #1: Type: text/plain, Size: 635 bytes --]


> > Ever heard of while loops?

was more about

> "for (; condition ;)".

:)


> FWIW, I think I prefer the "for (;;)" version for endless loops.
> It looks more intentional to me.  Some grep'ing showed nearly equal
> usage of "for (;;)" versus "while (1)".  Is there any "official"
> preference?  I don't see anything in CodingStyle about it.

I think while (1) looks more intentional, but I suppose that's because I
grew up with pascal where you can't do all these weird things with for
loops.

Feel free to drop this part of the patch if you wish, or, if you want, I
can resend without that too :)

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2006-11-16 23:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-16 23:04 d80211: clean up some list and loop code Johannes Berg
2006-11-16 23:25 ` John W. Linville
2006-11-16 23:37   ` Johannes Berg [this message]
2006-11-17  0:00     ` John W. Linville
2006-11-17  0:26       ` John W. Linville
2006-11-17  2:37   ` Dave Dillow
2006-11-16 23:40 ` Jouni Malinen
2006-11-16 23:42   ` Johannes Berg

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=1163720260.3392.24.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=jbenc@suse.cz \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).