[PATCH 2/3] panoramiX: convert 0->panoramiXNumScreens loops to macro (v2)
Dave Airlie
airlied at gmail.com
Wed Mar 9 16:14:27 PST 2011
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?
Dave.
More information about the xorg-devel
mailing list