All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giacomo Catenazzi <cate@debian.org>
To: Andreas Dilger <adilger@turbolabs.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [CHECKER] Is this a bug?
Date: Fri, 02 Nov 2001 11:09:49 +0100	[thread overview]
Message-ID: <3BE270ED.7050109@debian.org> (raw)
In-Reply-To: <fa.l396uov.18jgog6@ifi.uio.no> <fa.dvj9vsv.1b4k8ip@ifi.uio.no>

> 
> Also (in a separate patch at the end) is the removal of a whole bunch of:
> 
> #ifdef IP2DEBUG_TRACE
> 	ip2trace(foo);
> #endif
> 
> and replacing it with (the Linus-preferred, and far cleaner):
> 
> #ifdef IP2DEBUG_TRACE
> void ip2trace(foo)
> #else
> #define ip2trace(foo) do {} while (0)
> #endif
> 

Why in Linux we use "do {} while (0)" instead of the
standard "(void)0" ?
(standard = as normal libc in <assert.h>)

do while(0) is used for multiple statment macro to avoid problem
in if-else, not for empty instructions.


	giacomo


       reply	other threads:[~2001-11-02  9:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.l396uov.18jgog6@ifi.uio.no>
     [not found] ` <fa.dvj9vsv.1b4k8ip@ifi.uio.no>
2001-11-02 10:09   ` Giacomo Catenazzi [this message]
2001-11-01 19:13 [CHECKER] Is this a bug? Ken Ashcraft
2001-11-01 22:42 ` Andreas Dilger

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=3BE270ED.7050109@debian.org \
    --to=cate@debian.org \
    --cc=adilger@turbolabs.com \
    --cc=linux-kernel@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 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.