summaryrefslogtreecommitdiff
path: root/Xext/xf86bigfont.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 /Xext/xf86bigfont.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 'Xext/xf86bigfont.c')
-rw-r--r--Xext/xf86bigfont.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 68c5d5234..312fcc9e9 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -230,7 +230,7 @@ shmalloc(
if (size < 3500)
return (ShmDescPtr) NULL;
- pDesc = xalloc(sizeof(ShmDescRec));
+ pDesc = malloc(sizeof(ShmDescRec));
if (!pDesc)
return (ShmDescPtr) NULL;
@@ -239,7 +239,7 @@ shmalloc(
if (shmid == -1) {
ErrorF(XF86BIGFONTNAME " extension: shmget() failed, size = %u, %s\n",
size, strerror(errno));
- xfree(pDesc);
+ free(pDesc);
return (ShmDescPtr) NULL;
}
@@ -247,7 +247,7 @@ shmalloc(
ErrorF(XF86BIGFONTNAME " extension: shmat() failed, size = %u, %s\n",
size, strerror(errno));
shmctl(shmid, IPC_RMID, (void *) 0);
- xfree(pDesc);
+ free(pDesc);
return (ShmDescPtr) NULL;
}
@@ -276,7 +276,7 @@ shmdealloc(
if (pDesc->next) pDesc->next->prev = pDesc->prev;
*pDesc->prev = pDesc->next;
- xfree(pDesc);
+ free(pDesc);
}
#endif
@@ -464,7 +464,7 @@ ProcXF86BigfontQueryFont(
shmid = pDesc->shmid;
} else {
#endif
- pCI = xalloc(nCharInfos * sizeof(xCharInfo));
+ pCI = malloc(nCharInfos * sizeof(xCharInfo));
if (!pCI)
return BadAlloc;
#ifdef HAS_SHM
@@ -526,9 +526,9 @@ ProcXF86BigfontQueryFont(
if (hashModulus > nCharInfos+1)
hashModulus = nCharInfos+1;
- tmp = xalloc((4*nCharInfos+1) * sizeof(CARD16));
+ tmp = malloc((4*nCharInfos+1) * sizeof(CARD16));
if (!tmp) {
- if (!pDesc) xfree(pCI);
+ if (!pDesc) free(pCI);
return BadAlloc;
}
pIndex2UniqIndex = tmp;
@@ -610,12 +610,12 @@ ProcXF86BigfontQueryFont(
? nUniqCharInfos * sizeof(xCharInfo)
+ (nCharInfos+1)/2 * 2 * sizeof(CARD16)
: 0);
- xXF86BigfontQueryFontReply* reply = xalloc(rlength);
+ xXF86BigfontQueryFontReply* reply = malloc(rlength);
char* p;
if (!reply) {
if (nCharInfos > 0) {
- if (shmid == -1) xfree(pIndex2UniqIndex);
- if (!pDesc) xfree(pCI);
+ if (shmid == -1) free(pIndex2UniqIndex);
+ if (!pDesc) free(pCI);
}
return BadAlloc;
}
@@ -693,10 +693,10 @@ ProcXF86BigfontQueryFont(
}
}
WriteToClient(client, rlength, (char *)reply);
- xfree(reply);
+ free(reply);
if (nCharInfos > 0) {
- if (shmid == -1) xfree(pIndex2UniqIndex);
- if (!pDesc) xfree(pCI);
+ if (shmid == -1) free(pIndex2UniqIndex);
+ if (!pDesc) free(pCI);
}
return (client->noClientException);
}