On Fri, Oct 12, 2012 at 10:52 AM, Olivier Fourdan <ofour...@redhat.com> wrote:
> Jason Gerecke said the following on 10/12/2012 06:43 PM:
>
>> On Fri, Oct 12, 2012 at 2:41 AM, Olivier Fourdan<ofour...@redhat.com>
>> wrote:
>>>
>>> Peter Hutterer said the following on 10/12/2012 06:37 AM:
>>>>
>>>>    [...]
>>>> +                       *builtin = (flag&   (direct_flag | pointer_flag)
>>>> ==
>>>> direct_flag)
>>>>
>>>> +                                   ? IS_BUILTIN_TRUE :
>>>> IS_BUILTIN_FALSE;
>>>> please expand this to a normal condition - this is too nested to be
>>>> easily readable.
>>>
>>>
>>> Updated patch attached. Got rid of the 2 additional vars as they did not
>>> really help with readability.
>>>
>>> Cheers,
>>> Olivier.
>>>
>>> +                       if (flag == (1<<  INPUT_PROP_DIRECT))
>>> +                               *builtin = IS_BUILTIN_TRUE;
>>> +                       else
>>> +                               *builtin = IS_BUILTIN_FALSE;
>>> +
>>
>> Not quite correct, since there could be properties added in the future
>> whose bits we'd need to set in addition to INPUT_PROP_DIRECT. Third
>> time's the charm?
>
>
> You may have cut too much out and missed the "&=" on flag mask just before:
>
> +                       flag&= (1<<  INPUT_PROP_DIRECT) | (1<<
> INPUT_PROP_POINTER);
>
> +                       if (flag == (1<<  INPUT_PROP_DIRECT))
> +                               *builtin = IS_BUILTIN_TRUE;
> +                       else
> +                               *builtin = IS_BUILTIN_FALSE;
> +
>
> So it should be correct :)
>
> Cheers,
> Olivier

Whoops! You're right, of course :)

Jason

---
When you're rife with devastation / There's a simple explanation:
You're a toymaker's creation / Trapped inside a crystal ball.
And whichever way he tilts it / Know that we must be resilient
We won't let them break our spirits / As we sing our silly song.

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to