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: Tue, 18 Jan 2005 01:36:47 -0500

-On [20050118 05:02], David Cuthbert (dacut@xxxxxxxxx) wrote:
Heh... this is one of those areas where there seem to be two distinct camps with little grey area. :-)

Jeroen Ruigrok/asmodai wrote:
I think that this says enough:

intro(2):

Successful calls never set errno; once set, it remains until another error
occurs.  It should only be examined after an error.

Different issue. That just says that you can't rely on errno if the call is successful -- this is unambiguous.


The camps I was referring to are:

    if (errno)
        do_something();

vs.:

    if (errno != 0)
        do_something();


Clearly, the latter is The Way God Intended(tm), and the former is the way only infidels check integral values. I also have it on good authority that God Prefers Emacs and the UN has passed a resolution banning VHDL in favor of Verilog. And if you believe any of this paragraph, I have an amazing multi-level marketing opportunity for you! :-)


Dave



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