Hi,

On Fri, Jan 07, 2011 at 02:27:25PM -0500, Adam Jackson wrote:
>  dix/resource.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/dix/resource.c b/dix/resource.c
> index 6bd2403..07fcc65 100644
> --- a/dix/resource.c
> +++ b/dix/resource.c
> @@ -382,7 +382,6 @@ GetXIDRange(int client, Bool server, XID *minp, XID *maxp)
>      XID id, maxid;
>      ResourcePtr *resp;
>      ResourcePtr res;
> -    int i;
>      XID goodid;
>  
>      id = (Mask)client << CLIENTOFFSET;
> @@ -390,8 +389,8 @@ GetXIDRange(int client, Bool server, XID *minp, XID *maxp)
>       id |= client ? SERVER_BIT : SERVER_MINID;
>      maxid = id | RESOURCE_ID_MASK;
>      goodid = 0;
> -    for (resp = clientTable[client].resources, i = 
> clientTable[client].buckets;
> -      --i >= 0;)
> +    resp = clientTable[client].resources;
> +    if (clientTable[client].buckets)
>      {
>       for (res = *resp++; res; res = res->next)
>       {

Couldn't this all be better written as:
    for (i = 0; i < clientTable[client].buckets; i++)
    {
        res = clientTable[client].resources[i];
        [...]
    }

Cheers,
Daniel

Attachment: signature.asc
Description: Digital signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to