From owner-freebsd-hackers Wed Mar 6 10:50:14 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id A85C437B400 for ; Wed, 6 Mar 2002 10:50:11 -0800 (PST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.2/8.12.2) with ESMTP id g26InqLv026425; Wed, 6 Mar 2002 19:49:56 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Garance A Drosihn Cc: "Mike Meyer" , hackers@FreeBSD.ORG Subject: Re: RFC: style(9) isn't explicit about booleans for testing. In-Reply-To: Your message of "Wed, 06 Mar 2002 13:39:56 EST." Date: Wed, 06 Mar 2002 19:49:52 +0100 Message-ID: <26424.1015440592@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message , Garance A Drosihn writes: >In one message, > At 12:52 AM -0800 3/6/02, David O'Brien wrote: >>I don't think it is clarifying a rule. I think it is in fact adding >>a rule. You are extrapolating too much I think. All the rule is >>trying to prevent is "if (!strcmp(a,b))" which when read is extremely >>wrong of that is actually happening. > >In a later message (not directly replying to the above), > At 4:44 AM -0600 3/6/02, Mike Meyer wrote: >>Looking at the text in the page on -stable, I think the one-word >>change from boolean to "integer" would remove the ambiguity. > >If we change boolean to integer, then the proposed rule will not >prevent "if (!strcmp(a,b))" , because strcmp() *does* return an >integer value. Or am I missing something here? Right, and since the integer is well defined, if (!strcmp(a, b)) is perfectly understandable so what is the problem ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message