summaryrefslogtreecommitdiff
path: root/randr/rrscreen.c
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2010-05-06 01:44:06 +0700
committerMikhail Gusarov <dottedmag@dottedmag.net>2010-05-13 00:22:37 +0700
commit3f3ff971ecff9936cebafc813af9193b97bba89c (patch)
treefdbbad794a42488b7ffe41eed7aba4e498335f55 /randr/rrscreen.c
parent96c7ab27c383ec767f62a7a11e5fd76f86363fbc (diff)
Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'randr/rrscreen.c')
-rw-r--r--randr/rrscreen.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 26de1e2e2..c372d4669 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -383,10 +383,10 @@ rrGetScreenResources(ClientPtr client, Bool query)
extraLen = rep.length << 2;
if (extraLen)
{
- extra = xalloc (extraLen);
+ extra = malloc(extraLen);
if (!extra)
{
- xfree (modes);
+ free(modes);
return BadAlloc;
}
}
@@ -450,7 +450,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
mode->mode.nameLength);
names += mode->mode.nameLength;
}
- xfree (modes);
+ free(modes);
assert (bytes_to_int32((char *) names - (char *) extra) == rep.length);
}
@@ -468,7 +468,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
if (extraLen)
{
WriteToClient (client, extraLen, (char *) extra);
- xfree (extra);
+ free(extra);
}
return client->noClientException;
}
@@ -666,10 +666,10 @@ ProcRRGetScreenInfo (ClientPtr client)
if (extraLen)
{
- extra = (CARD8 *) xalloc (extraLen);
+ extra = (CARD8 *) malloc(extraLen);
if (!extra)
{
- xfree (pData);
+ free(pData);
return BadAlloc;
}
}
@@ -715,7 +715,7 @@ ProcRRGetScreenInfo (ClientPtr client)
}
}
}
- xfree (pData);
+ free(pData);
data8 = (CARD8 *) rates;
@@ -738,7 +738,7 @@ ProcRRGetScreenInfo (ClientPtr client)
if (extraLen)
{
WriteToClient (client, extraLen, (char *) extra);
- xfree (extra);
+ free(extra);
}
return (client->noClientException);
}
@@ -831,7 +831,7 @@ ProcRRSetScreenConfig (ClientPtr client)
* Invalid size ID
*/
client->errorValue = stuff->sizeID;
- xfree (pData);
+ free(pData);
return BadValue;
}
pSize = &pData->sizes[stuff->sizeID];
@@ -853,7 +853,7 @@ ProcRRSetScreenConfig (ClientPtr client)
* Invalid rotation
*/
client->errorValue = stuff->rotation;
- xfree (pData);
+ free(pData);
return BadValue;
}
@@ -863,7 +863,7 @@ ProcRRSetScreenConfig (ClientPtr client)
* requested rotation or reflection not supported by screen
*/
client->errorValue = stuff->rotation;
- xfree (pData);
+ free(pData);
return BadMatch;
}
@@ -888,7 +888,7 @@ ProcRRSetScreenConfig (ClientPtr client)
* Invalid rate
*/
client->errorValue = rate;
- xfree (pData);
+ free(pData);
return BadValue;
}
mode = pSize->pRates[i].mode;
@@ -954,7 +954,7 @@ ProcRRSetScreenConfig (ClientPtr client)
sendReply:
if (pData)
- xfree (pData);
+ free(pData);
rep.type = X_Reply;
/* rep.status has already been filled in */
@@ -997,7 +997,7 @@ RR10CurrentSizeID (ScreenPtr pScreen)
sizeID = (CARD16) i;
break;
}
- xfree (data);
+ free(data);
}
}
return sizeID;