This is the mail archive of the
mailing list for the Cygwin project.
RE: cygwin source question
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: <cygwin at cygwin dot com>
- Date: Sun, 21 Jan 2007 16:29:19 -0000
- Subject: RE: cygwin source question
- References: <20070121143731.GC25379@ns1.anodized.com>
On 21 January 2007 14:38, Christopher Layne wrote:
> I notice in some places, there are double-negates, like:
> me->read_ready |= ret || !!(events & (FD_READ | FD_ACCEPT | FD_CLOSE));
> What's the rationale for these? To enforce either a 0 or 1, to be directly
> in line with boolean, rather than a zero or non-zero result?
It's a standard C idiom for that, yeh, it normalizes zero/non-zero into 0/1.
Can't think of a witty .sigline today....
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html