public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Timothy Miller <miller@techsource.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Coding technique question
Date: Mon, 16 Jun 2003 15:56:07 -0400	[thread overview]
Message-ID: <20030616195607.GA21660@gtf.org> (raw)
In-Reply-To: <3EEE2293.6010304@techsource.com>

On Mon, Jun 16, 2003 at 04:03:31PM -0400, Timothy Miller wrote:
> I believe I've seen this sort of thing done in the kernel:
> 
> do {
>     ....
>     code
>     ....
> } while (0);
> 
> 
> What I was wondering is how this is any different from:
> 
> {
>     ....
>     code
>     ....
> }

It's not... unless you're creating a function-like macro.

	Jeff




  reply	other threads:[~2003-06-16 19:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-16 20:03 Coding technique question Timothy Miller
2003-06-16 19:56 ` Jeff Garzik [this message]
2003-06-16 20:05 ` Aschwin Marsman
2003-06-16 20:23   ` Timothy Miller
2003-06-19  2:16   ` david nicol

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=20030616195607.GA21660@gtf.org \
    --to=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miller@techsource.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox