[PATCH] resource: Remove a useless iteration

Daniel Stone daniel at fooishbar.org
Mon Jan 10 09:49:24 PST 2011


On Mon, Jan 10, 2011 at 12:44:23PM -0500, Adam Jackson wrote:
> v2: More aggressive loop rewrite pointed out by Daniel.

Sorry, I should've mentioned this the first time -- only realised after
I sent the mail -- but:

> +    for (i = 0; i < clientTable[client].buckets; i++) {
> +	res = clientTable[client].resources[i];

I think you need a:
    if (!res)
        break;
here?

That aside:
Reviewed-by: Daniel Stone <daniel at fooishbar.org>

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110110/8d488ad0/attachment.pgp>


More information about the xorg-devel mailing list