On Tue, Sep 29, 2015 at 11:11 PM, Ben Pfaff <b...@nicira.com> wrote:
> On Tue, Sep 29, 2015 at 04:46:37PM -0700, Ben Pfaff wrote:
>> On Wed, Sep 23, 2015 at 02:25:47PM -0700, Andy Zhou wrote:
>> > On Fri, Sep 18, 2015 at 3:26 PM, Ben Pfaff <b...@nicira.com> wrote:
>> > > These functions could only work with 32-bit integers because of their
>> > > special cases for an argument of value 0. However, none of the existing
>> > > users depended on this special case, and some of the users did try to use
>> > > these functions with 64-bit integer arguments. Thus, this commit changes
>> > > them to support 64-bit integer arguments and drops the special cases for
>> > > zero.
>> > >
>> > I wonder what would be the down side of returning 64 for zeros?
>>
>> Probably just an extra branch. It's conceptually a little weird though.
>
> I decided to apply this to master on the basis of Kyle's review.
>
> Returning 64 would be marginally safer though, even if it's slightly
> more expensive. That might be the right trade-off, I'm not sure.
Since the value is only marginal, it may not be worthwhile to add the
extra check.
At any rate, the comment makes it clear that zero is not expected.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev