From owner-cvs-all Wed Sep 11 10:15:54 2002 Delivered-To: cvs-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 2EAB037B400; Wed, 11 Sep 2002 10:15:48 -0700 (PDT) Date: Wed, 11 Sep 2002 10:15:48 -0700 From: Juli Mallett To: Bruce Evans Cc: Tony Finch , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/uudecode uudecode.c Message-ID: <20020911101548.A46043@FreeBSD.org> References: <20020910145812.B78992@FreeBSD.org> <20020911205548.E1092-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020911205548.E1092-100000@gamplex.bde.org>; from bde@zeta.org.au on Wed, Sep 11, 2002 at 09:01:50PM +1000 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , , X-Towel: Yes X-LiveJournal: flata, jmallett X-Negacore: Yes Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * De: Bruce Evans [ Data: 2002-09-11 ] [ Subjecte: Re: cvs commit: src/usr.bin/uudecode uudecode.c ] > On Tue, 10 Sep 2002, Juli Mallett wrote: > > > * De: Tony Finch [ Data: 2002-09-10 ] > > > ... > > > Log: > > > Style: Don't treat pointers as booleans. > > > > Do we have a firm style(9) ruling on that? There's like two cases I know > > of where it's justified, both are code that return pointers, and use 0 / false > > internally. I loathe if(ptr) almost as much as if(foo &bitmask) and if(!strcmp) > > What's wrong with "if(foo &bitmask)" (except for its whitespace of course)? > It is a multi-boolean test if bitmask is essentially an array of booleans. > It seems to be Normal KNF too. But !(foo & bitmask) seems to be abNormal -- > (foo & bitmask) == 0 seems to be normal. If you have bit overlap, you may get false positive/negative, though sometimes that may be what is intended. -- Juli Mallett | FreeBSD: The Power To Serve Will break world for fulltime employment. | finger jmallett@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message