[PATCH 2/5] resource: s/NullResource/NULL/g

Alan Coopersmith alan.coopersmith at oracle.com
Sun Jan 9 12:34:31 PST 2011


On 01/ 7/11 11:27 AM, Adam Jackson wrote:
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>  dix/resource.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/dix/resource.c b/dix/resource.c
> index 07fcc65..fcda116 100644
> --- a/dix/resource.c
> +++ b/dix/resource.c
> @@ -167,7 +167,6 @@ typedef struct _Resource {
>      RESTYPE		type;
>      pointer		value;
>  } ResourceRec, *ResourcePtr;
> -#define NullResource ((ResourcePtr)NULL)
>  
>  typedef struct _ClientResource {
>      ResourcePtr *resources;
> @@ -326,7 +325,7 @@ InitClientResources(ClientPtr client)
>      clientTable[i].expectID = client->clientAsMask;
>      for (j=0; j<INITBUCKETS; j++) 
>      {
> -        clientTable[i].resources[j] = NullResource;
> +        clientTable[i].resources[j] = NULL;
>      }
>      return TRUE;
>  }
> @@ -542,7 +541,7 @@ RebuildTable(int client)
>      }
>      for (rptr = resources, tptr = tails; --j >= 0; rptr++, tptr++)
>      {
> -	*rptr = NullResource;
> +	*rptr = NULL;
>  	*tptr = rptr;
>      }
>      clientTable[client].hashsize++;
> @@ -554,7 +553,7 @@ RebuildTable(int client)
>  	for (res = *rptr; res; res = next)
>  	{
>  	    next = res->next;
> -	    res->next = NullResource;
> +	    res->next = NULL;
>  	    tptr = &tails[Hash(client, res->id)];
>  	    **tptr = res;
>  	    *tptr = &res->next;

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list