On Wed, Mar 06, 2002 at 02:37:45PM -0500, Garance A Drosihn wrote: > At 7:49 PM +0100 3/6/02, Poul-Henning Kamp wrote: > >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. > > > > > >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 ? > > Well, that's my question. David's comment implies that it is not > good to do '!strcmp()', and I was wondering why it is not good...
Implies??? I thought I was quite explicit: to prevent is "if (!strcmp(a,b))" which when read is extremely wrong of that is actually happening. ! is pronounced "NOT". When read "if not string compare a with b then do X", is the opposite of the the logic of the expression does. Which is "if string compare a with b is equal then do X". ["if (strcmp(a,b) == 0)"] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message