[PATCH 2/3] panoramiX: convert 0->panoramiXNumScreens loops to macro (v2)
Alan Coopersmith
alan.coopersmith at oracle.com
Wed Mar 9 16:17:05 PST 2011
On 03/ 9/11 04:14 PM, Dave Airlie wrote:
> On Thu, Mar 10, 2011 at 9:48 AM, Daniel Stone <daniel at fooishbar.org> wrote:
>> Hi,
>>
>> On Thu, Mar 10, 2011 at 09:23:34AM +1000, Dave Airlie wrote:
>>> diff --git a/Xext/saver.c b/Xext/saver.c
>>> index 1888603..492a54f 100644
>>> --- a/Xext/saver.c
>>> +++ b/Xext/saver.c
>>> @@ -1288,7 +1288,7 @@ ProcScreenSaverUnsetAttributes (ClientPtr client)
>>> if (rc != Success)
>>> return (rc == BadValue) ? BadDrawable : rc;
>>>
>>> - for(i = PanoramiXNumScreens - 1; i > 0; i--) {
>>> + FOR_NSCREENS_BACKWARD(i) {
>>> stuff->drawable = draw->info[i].id;
>>> ScreenSaverUnsetAttributes(client);
>>> }
>>
>> You're changing semantics here by changing info[0..n], rather than
>> info[1..n]. Looks like you might just be able to turn this into a
>> FOR_NSCREENS_FORWARD_SKIP though?
>
> thats n-1..0 to n-1..0 isn't it?
I missed it in my review, but I think Daniel is right, since it's i > 0,
not i >= 0.
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the xorg-devel
mailing list