From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31903 invoked by alias); 11 Dec 2012 01:54:10 -0000 Received: (qmail 31890 invoked by uid 22791); 11 Dec 2012 01:54:09 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Dec 2012 01:54:05 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 98AAE2E0B7; Mon, 10 Dec 2012 20:54:04 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fyDA1g66wl6R; Mon, 10 Dec 2012 20:54:04 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 1FC9A1C7FD4; Mon, 10 Dec 2012 20:54:04 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id D1CF1C3B05; Tue, 11 Dec 2012 05:53:43 +0400 (RET) Date: Tue, 11 Dec 2012 01:54:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Matt Rice Subject: Re: [doc patch] coding style: 0 vs. NULL + [patch] Code cleanup: skip.c Message-ID: <20121211015343.GM31477@adacore.com> References: <20121210184220.GA29321@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121210184220.GA29321@host2.jankratochvil.net> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-12/txt/msg00291.txt.bz2 > But GDB (IMO fortunately) already uses everywhere properly NULL vs. 0. [...] > I have added a new rule for the coding style for it. So, just to be certain, this also includes testing for NULL, right? Code like... first = strstr (big, small); if (first) ... should be written instead: if (first != NULL) ? -- Joel