Date: Wed, 06 Mar 2002 19:49:52 +0100 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Garance A Drosihn <drosih@rpi.edu> Cc: "Mike Meyer" <mwm-dated-1015843484.1eabc5@mired.org>, hackers@FreeBSD.ORG Subject: Re: RFC: style(9) isn't explicit about booleans for testing. Message-ID: <26424.1015440592@critter.freebsd.dk> In-Reply-To: Your message of "Wed, 06 Mar 2002 13:39:56 EST." <p0510150fb8ac11d15f26@[128.113.24.47]>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <p0510150fb8ac11d15f26@[128.113.24.47]>, 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?26424.1015440592>