linux-mips
[Top] [All Lists]

Re: [PATCH] Use NULL for pointer

To: post@pfrst.de
Subject: Re: [PATCH] Use NULL for pointer
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Fri, 13 Jul 2007 22:07:11 +0900 (JST)
Cc: linux-mips@linux-mips.org
In-reply-to: <Pine.LNX.4.21.0707130135090.1523-100000@Opal.Peter>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20070713.014949.55147875.anemo@mba.ocn.ne.jp> <Pine.LNX.4.21.0707130135090.1523-100000@Opal.Peter>
Sender: linux-mips-bounce@linux-mips.org
On Fri, 13 Jul 2007 01:50:07 +0200 (CEST), post@pfrst.de wrote:
> Please excuse me, i couldn't restrain myself from commenting on this.
> It's a pity, that a weird warning (which gcc version with what settings
> did produce it ?) urges one to (re-)introduce this obsolescent macro.

The warning is produced by sparse, not gcc.

http://www.kernel.org/pub/software/devel/sparse/

I know C++ dislike NULL, but it seems kernel developpers like NULL for
a null pointer.  There is another way to convert a pointer to a bool:

                action = board_be_handler(regs, !!fixup);

It might satisfy both people, but might surprise other people a bit :)

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>