Re: RFC: Port of NetBSD cat(1)'s -f option.

Dag-Erling Smorgrav <[email protected]>
Newsgroups gmane.os.freebsd.devel.audit
Message-ID <[email protected]>
Giorgos Keramidas <[email protected]> writes:
> I'm not sure.  The < 0 check is almost hardwired in my fingers,
> because of a few years of writing it this way.  Just trying to be on
> the safe side of the world, I guess.

It's also a single instruction (+ a flag check) on most architectures,
while an explicit comparison is at least two, and possibly trashes a
register.

That being said, I use == -1 myself - but I don't think < 0 is wrong,
just different.  As long as we're consistent, I don't care.

DES
-- 
Dag-Erling Smorgrav - [email protected]

To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-audit" in the body of the message
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.