DragonFly BSD
DragonFly kernel List (threaded) for 2005-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: sasc re-write


From: David Cuthbert <dacut@xxxxxxxxx>
Date: Mon, 17 Jan 2005 22:48:02 -0500

On Mon(17)/Jan/05 - , Diane Bruce wrote:
I'd not attempt to use errno as a boolean, I'd do:

Liam J Foy wrote:
I disagree. errno is normally used as boolean.

Heh... this is one of those areas where there seem to be two distinct camps with little grey area. :-) For the record, I'm in the "Thou shalt not use an integral value as the result in thy boolean test" camp with Diane here. Zero meaning false, non-zero meaning true is merely a convention (which is simple to grasp and not as error-prone as many other conventions, admittedly, but still a convention).


In the end, I think that being an electrical engineer -- where we study hole flow and active low signals are common -- makes me value the clarity of an explicit integral test, even if the code compiles the same.

Even so... I'd hope that nobody starts wasting time by submitting patches for this (one way or the other).

Dave



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]