From owner-freebsd-current Tue Aug 11 10:49:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA07520 for freebsd-current-outgoing; Tue, 11 Aug 1998 10:49:59 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA07515 for ; Tue, 11 Aug 1998 10:49:58 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id NAA29106; Tue, 11 Aug 1998 13:46:44 -0400 (EDT) (envelope-from luoqi) Date: Tue, 11 Aug 1998 13:46:44 -0400 (EDT) From: Luoqi Chen Message-Id: <199808111746.NAA29106@lor.watermarkgroup.com> To: green@zone.syracuse.NET, luoqi@watermarkgroup.com Subject: Re: New softupdates code panics Cc: archer@lucky.net, bde@zeta.org.au, current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I think I understand here, you meant the association of the code would be > (doingdirectory && newparent) ? newparent : doingdirectory > rather that > doingdirectory && (newparent ? newparent : doingdirectory) > correct? And that would have been what led to the confusion. > > Cheers, > Brian Feldman > Actually that's not the reason, && always has a higher associativity priority than ?: The real reason is if both doingdirectory and newparent are boolean, then the expression equals to doingdirectory: Let D = doingdirectory, N = newparent, the expression is (DN)N + !(DN)D = DN + (!DD + !ND) = DN + D!N = D This is no longer true if newparent and the expression are integer valued. -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message