Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Sep 2000 15:47:40 +1100
From:      "Jan Mikkelsen" <janm@transactionsite.com>
To:        "BSD" <bsd@shell-server.com>
Cc:        <stable@FreeBSD.ORG>
Subject:   Re: Constant panics on 4.1-STABLE!
Message-ID:  <002101c025e2$92868560$0901a8c0@haym.transactionsite.com>

next in thread | raw e-mail | index | archive | help
BSD <bsd@shell-server.com> wrote:

>On Wed, 20 Sep 2000, Michael Allman wrote:
>> 132 /*
>> 133 * Look up the address in the table for that Address Family
>> 134 */
>> 135 if (rnh && (rn = rnh->rnh_matchaddr((caddr_t)dst, rnh)) &&
>> 136     ((rn->rn_flags & RNF_ROOT) == 0)) {
>
> C doesn't guarantee order of execution in if ( bleh && bleh &&
>bleh).  It may very well evaluate it backwards, or from the inside out if
>it wants.  No?


No.  The fact that the expression is used in an if statement doesn't change
the order in which the expression is evalutated.  The && operator groups
left to right, and the second operand is not evalutated if the first is
false.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002101c025e2$92868560$0901a8c0>