mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kyle Moffett <mrmacman_g4@mac.com>
To: Daniel Hazelton <dhazelton@enter.net>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>,
	Cong WANG <xiyou.wangcong@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Style Question
Date: Sun, 11 Mar 2007 18:01:38 -0400	[thread overview]
Message-ID: <14DE5DBD-4164-4CDF-9690-631514EB15EF@mac.com> (raw)
In-Reply-To: <200703111641.52066.dhazelton@enter.net>

On Mar 11, 2007, at 16:41:51, Daniel Hazelton wrote:
> On Sunday 11 March 2007 16:35:50 Jan Engelhardt wrote:
>> On Mar 11 2007 22:15, Cong WANG wrote:
>>> So can I say using NULL is better than 0 in kernel?
>>
>> On what basis? Do you even know what NULL is defined as in (C, not  
>> C++) userspace? Think about it.
>
> IIRC, the glibc and GCC headers define NULL as (void*)0  :)

On the other hand when __cplusplus is defined they define it to the  
"__null" builtin, which GCC uses to give type conversion errors for  
"int foo = NULL" but not "char *foo = NULL".  A "((void *)0)"  
definition gives C++ type errors for both due to the broken C++ void  
pointer conversion problems.

Cheers,
Kyle Moffett


  reply	other threads:[~2007-03-11 22:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-11 14:15 Cong WANG
2007-03-11 14:22 ` Bernd Petrovitsch
2007-03-11 20:35 ` Jan Engelhardt
2007-03-11 20:41   ` Daniel Hazelton
2007-03-11 22:01     ` Kyle Moffett [this message]
2007-03-11 23:16       ` Jan Engelhardt
2007-03-12  1:27         ` Kyle Moffett
2007-03-12  1:32           ` Jan Engelhardt
2007-03-12  1:43             ` Kyle Moffett
2007-03-12  5:37   ` Cong WANG
2007-03-12  5:40     ` Jan Engelhardt
2007-03-12  5:52       ` Nicholas Miell
2007-03-12  6:18       ` Randy.Dunlap
     [not found]       ` <MDEHLPKNGKAHNMBLJOLKOEBCCDAC.davids@webmaster.com>
2007-03-12 13:52         ` Cong WANG
     [not found] <fa.Da+t1e9MgP7HaKS+dOWXVD8aYNI@ifi.uio.no>
2007-03-11 15:47 ` Robert Hancock

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=14DE5DBD-4164-4CDF-9690-631514EB15EF@mac.com \
    --to=mrmacman_g4@mac.com \
    --cc=dhazelton@enter.net \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiyou.wangcong@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®