Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Oct 2013 10:41:13 -0600
From:      Scott Long <scott4long@yahoo.com>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        "FreeBSD-scsi@freebsd.org" <FreeBSD-scsi@freebsd.org>
Subject:   Re: pci_alloc_msi is always called, is this bad?
Message-ID:  <80AF177A-215F-49B7-8254-8FD896945849@yahoo.com>
In-Reply-To: <20131004161947.GU41229@kib.kiev.ua>
References:  <CAFMmRNzWwxe=YVJcC7Lkjqru5eugciwzEQHjgE-Bh-ctOykVNQ@mail.gmail.com> <20131003194704.GG41229@kib.kiev.ua> <1380902209.2621.11.camel@localhost> <94C7BB39-A287-44D4-9992-E8DAE83CE6D4@yahoo.com> <20131004161947.GU41229@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

On Oct 4, 2013, at 10:19 AM, Konstantin Belousov <kostikbel@gmail.com> =
wrote:

> On Fri, Oct 04, 2013 at 10:05:18AM -0600, Scott Long wrote:
>> It used to be that gcc would generate code that would conditionally =
execute the second clause only if the first clause were true.  If that's =
not longer the case (with gcc and/or clang), then I bet that UDF will =
break due to this:
>>=20
>>       /*
>>         * Check to see if the fid is fragmented. The first test
>>         * ensures that we don't wander off the end of the buffer
>>         * looking for the l_iu and l_fi fields.
>>         */
>>        if (ds->off + UDF_FID_SIZE > ds->size ||
>>            ds->off + le16toh(fid->l_iu) + fid->l_fi + UDF_FID_SIZE > =
ds->size){
> Is this some sort of joke ?
>=20
> C 'and' and 'or' logical operators are short-circuit. It is not
> compiler-depended.

Meh, I was young and stupid.  The generated code supported the =
construct.

Scott




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?80AF177A-215F-49B7-8254-8FD896945849>