From owner-cvs-src@FreeBSD.ORG Wed Oct 29 02:18:10 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA06A16A4CE for ; Wed, 29 Oct 2003 02:18:10 -0800 (PST) Received: from falcon.midgard.homeip.net (h76n3fls24o1048.bredband.comhem.se [213.67.148.76]) by mx1.FreeBSD.org (Postfix) with SMTP id 20BA743F85 for ; Wed, 29 Oct 2003 02:18:08 -0800 (PST) (envelope-from ertr1013@student.uu.se) Received: (qmail 34260 invoked by uid 1001); 29 Oct 2003 10:18:05 -0000 Date: Wed, 29 Oct 2003 11:18:05 +0100 From: Erik Trulsson To: Pawel Jakub Dawidek Message-ID: <20031029101805.GA24695@falcon.midgard.homeip.net> Mail-Followup-To: Pawel Jakub Dawidek , Martin Blapp , cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org References: <200310290918.h9T9IiwQ095857@repoman.freebsd.org> <20031029095700.GU84474@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031029095700.GU84474@garage.freebsd.pl> User-Agent: Mutt/1.5.4i cc: cvs-src@FreeBSD.org cc: Martin Blapp cc: cvs-all@FreeBSD.org cc: src-committers@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/rpc clnt_simple.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2003 10:18:11 -0000 On Wed, Oct 29, 2003 at 10:57:00AM +0100, Pawel Jakub Dawidek wrote: > On Wed, Oct 29, 2003 at 01:18:44AM -0800, Martin Blapp wrote: > +> Commiter: Martin Blapp > > Hi Martin!:) > > +> Log: > +> Don't use NULL to compare against a character. > [...] > +> - if ((nettype == NULL) || (nettype[0] == NULL)) > +> + if ((nettype == NULL) || (nettype[0] == 0)) > > More correct is to use '\0' for characters comparsion. No, not *more* correct. '\0' and 0 are both constants with type "int" and value zero, so they can be used interchangeably. For stylistic reasons one might wish to use '\0' instead of 0 for character comparisons, but the the C language does not make a difference. -- Erik Trulsson ertr1013@student.uu.se