From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266188AbUGJIXK (ORCPT ); Sat, 10 Jul 2004 04:23:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266189AbUGJIXK (ORCPT ); Sat, 10 Jul 2004 04:23:10 -0400 Received: from mail.enyo.de ([212.9.189.167]:23568 "EHLO mail.enyo.de") by vger.kernel.org with ESMTP id S266188AbUGJIXI (ORCPT ); Sat, 10 Jul 2004 04:23:08 -0400 To: Michael Buesch Cc: Martin Zwickel , root@chaos.analogic.com, Herbert Xu , Chris Wright , akpm@osdl.org, torvalds@osdl.org, linux-kernel@vger.kernel.org, sds@epoch.ncsc.mil, jmorris@redhat.com, mika@osdl.org Subject: Re: [PATCH] Use NULL instead of integer 0 in security/selinux/ References: <200407081328.40545.mbuesch@freenet.de> <20040708134459.6970a20b@phoebee> <200407081406.23831.mbuesch@freenet.de> From: Florian Weimer Date: Sat, 10 Jul 2004 10:22:57 +0200 In-Reply-To: <200407081406.23831.mbuesch@freenet.de> (Michael Buesch's message of "Thu, 8 Jul 2004 14:06:22 +0200") Message-ID: <87hdsgp8ym.fsf@deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org * Michael Buesch: > Yes, I never understood the reason for this ugly > #if defined(__cplusplus) here. > It works, but is IMHO unneccessary. It's necessary because in C++, (void *)0 is not implicitly converted to other pointer types. Having to write static_cast(NULL) is certainly a bit too verbose. There's also a C++ DR about this topic because people feel that there should be a 0/NULL distinction for overloading. But this is completely irrelevant to C code.