aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/resource.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-16 20:50:58 +0000
committermarha <marha@users.sourceforge.net>2010-05-16 20:50:58 +0000
commit1c94119ae26b94a60bb2c2b33494ed43c3b8a52f (patch)
treecfe0c736c95314edac7d9f1065be9c13026ed0c1 /xorg-server/dix/resource.c
parent6b29aa4559aeb6f795caee047561654bfa0a1954 (diff)
downloadvcxsrv-1c94119ae26b94a60bb2c2b33494ed43c3b8a52f.tar.gz
vcxsrv-1c94119ae26b94a60bb2c2b33494ed43c3b8a52f.tar.bz2
vcxsrv-1c94119ae26b94a60bb2c2b33494ed43c3b8a52f.zip
svn merge -r588:HEAD ^/branches/released .
Diffstat (limited to 'xorg-server/dix/resource.c')
-rw-r--r--xorg-server/dix/resource.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/xorg-server/dix/resource.c b/xorg-server/dix/resource.c
index 2eb1b3697..00b3368a0 100644
--- a/xorg-server/dix/resource.c
+++ b/xorg-server/dix/resource.c
@@ -204,7 +204,7 @@ CreateNewResourceType(DeleteType deleteFunc, char *name)
if (next & lastResourceClass)
return 0;
- funcs = (DeleteType *)xrealloc(DeleteFuncs,
+ funcs = (DeleteType *)realloc(DeleteFuncs,
(next + 1) * sizeof(DeleteType));
if (!funcs)
return 0;
@@ -252,8 +252,8 @@ InitClientResources(ClientPtr client)
lastResourceClass = RC_LASTPREDEF;
TypeMask = RC_LASTPREDEF - 1;
if (DeleteFuncs)
- xfree(DeleteFuncs);
- DeleteFuncs = xalloc((lastResourceType + 1) * sizeof(DeleteType));
+ free(DeleteFuncs);
+ DeleteFuncs = malloc((lastResourceType + 1) * sizeof(DeleteType));
if (!DeleteFuncs)
return FALSE;
DeleteFuncs[RT_NONE & TypeMask] = (DeleteType)NoopDDA;
@@ -268,7 +268,7 @@ InitClientResources(ClientPtr client)
DeleteFuncs[RT_PASSIVEGRAB & TypeMask] = DeletePassiveGrab;
}
clientTable[i = client->index].resources =
- xalloc(INITBUCKETS*sizeof(ResourcePtr));
+ malloc(INITBUCKETS*sizeof(ResourcePtr));
if (!clientTable[i].resources)
return FALSE;
clientTable[i].buckets = INITBUCKETS;
@@ -459,7 +459,7 @@ AddResource(XID id, RESTYPE type, pointer value)
(rrec->hashsize < MAXHASHSIZE))
RebuildTable(client);
head = &rrec->resources[Hash(client, id)];
- res = xalloc(sizeof(ResourceRec));
+ res = malloc(sizeof(ResourceRec));
if (!res)
{
(*DeleteFuncs[type & TypeMask])(value, id);
@@ -491,13 +491,13 @@ RebuildTable(int client)
*/
j = 2 * clientTable[client].buckets;
- tails = xalloc(j * sizeof(ResourcePtr *));
+ tails = malloc(j * sizeof(ResourcePtr *));
if (!tails)
return;
- resources = xalloc(j * sizeof(ResourcePtr));
+ resources = malloc(j * sizeof(ResourcePtr));
if (!resources)
{
- xfree(tails);
+ free(tails);
return;
}
for (rptr = resources, tptr = tails; --j >= 0; rptr++, tptr++)
@@ -520,9 +520,9 @@ RebuildTable(int client)
*tptr = &res->next;
}
}
- xfree(tails);
+ free(tails);
clientTable[client].buckets *= 2;
- xfree(clientTable[client].resources);
+ free(clientTable[client].resources);
clientTable[client].resources = resources;
}
@@ -558,7 +558,7 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType)
if (rtype != skipDeleteFuncType)
(*DeleteFuncs[rtype & TypeMask])(res->value, res->id);
- xfree(res);
+ free(res);
if (*eltptr != elements)
prev = head; /* prev may no longer be valid */
}
@@ -595,7 +595,7 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree)
if (!skipFree)
(*DeleteFuncs[type & TypeMask])(res->value, res->id);
- xfree(res);
+ free(res);
break;
}
else
@@ -762,7 +762,7 @@ FreeClientNeverRetainResources(ClientPtr client)
elements = *eltptr;
(*DeleteFuncs[rtype & TypeMask])(this->value, this->id);
- xfree(this);
+ free(this);
if (*eltptr != elements)
prev = &resources[j]; /* prev may no longer be valid */
}
@@ -816,10 +816,10 @@ FreeClientResources(ClientPtr client)
CallResourceStateCallback(ResourceStateFreeing, this);
(*DeleteFuncs[rtype & TypeMask])(this->value, this->id);
- xfree(this);
+ free(this);
}
}
- xfree(clientTable[client->index].resources);
+ free(clientTable[client->index].resources);
clientTable[client->index].resources = NULL;
clientTable[client->index].buckets = 0;
}