delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
To: | <cygwin AT cygwin DOT com> |
References: | <20070121143731 DOT GC25379 AT ns1 DOT anodized DOT com> |
Subject: | RE: cygwin source question |
Date: | Sun, 21 Jan 2007 16:29:19 -0000 |
Message-ID: | <009401c73d79$4cf91d40$a501a8c0@CAM.ARTIMI.COM> |
MIME-Version: | 1.0 |
X-Mailer: | Microsoft Office Outlook 11 |
In-Reply-To: | <20070121143731.GC25379@ns1.anodized.com> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT 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. cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |