diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-05-06 01:44:06 +0700 |
---|---|---|
committer | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-05-13 00:22:37 +0700 |
commit | 3f3ff971ecff9936cebafc813af9193b97bba89c (patch) | |
tree | fdbbad794a42488b7ffe41eed7aba4e498335f55 /composite/compalloc.c | |
parent | 96c7ab27c383ec767f62a7a11e5fd76f86363fbc (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 'composite/compalloc.c')
-rw-r--r-- | composite/compalloc.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/composite/compalloc.c b/composite/compalloc.c index 73adc72d0..a764972a2 100644 --- a/composite/compalloc.c +++ b/composite/compalloc.c @@ -99,7 +99,7 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update) * The client *could* allocate multiple, but while supported, * it is not expected to be common */ - ccw = xalloc (sizeof (CompClientWindowRec)); + ccw = malloc(sizeof (CompClientWindowRec)); if (!ccw) return BadAlloc; ccw->id = FakeClientID (pClient->index); @@ -109,10 +109,10 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update) */ if (!cw) { - cw = xalloc (sizeof (CompWindowRec)); + cw = malloc(sizeof (CompWindowRec)); if (!cw) { - xfree (ccw); + free(ccw); return BadAlloc; } cw->damage = DamageCreate (compReportDamage, @@ -123,8 +123,8 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update) pWin); if (!cw->damage) { - xfree (ccw); - xfree (cw); + free(ccw); + free(cw); return BadAlloc; } if (wasMapped) @@ -207,7 +207,7 @@ compFreeClientWindow (WindowPtr pWin, XID id) *prev = ccw->next; if (ccw->update == CompositeRedirectManual) cw->update = CompositeRedirectAutomatic; - xfree (ccw); + free(ccw); break; } } @@ -229,7 +229,7 @@ compFreeClientWindow (WindowPtr pWin, XID id) REGION_UNINIT (pScreen, &cw->borderClip); dixSetPrivate(&pWin->devPrivates, CompWindowPrivateKey, NULL); - xfree (cw); + free(cw); } else if (cw->update == CompositeRedirectAutomatic && !cw->damageRegistered && pWin->redirectDraw != RedirectDrawNone) @@ -295,7 +295,7 @@ compRedirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update) * The client *could* allocate multiple, but while supported, * it is not expected to be common */ - ccw = xalloc (sizeof (CompClientWindowRec)); + ccw = malloc(sizeof (CompClientWindowRec)); if (!ccw) return BadAlloc; ccw->id = FakeClientID (pClient->index); @@ -305,10 +305,10 @@ compRedirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update) */ if (!csw) { - csw = xalloc (sizeof (CompSubwindowsRec)); + csw = malloc(sizeof (CompSubwindowsRec)); if (!csw) { - xfree (ccw); + free(ccw); return BadAlloc; } csw->update = CompositeRedirectAutomatic; @@ -327,10 +327,10 @@ compRedirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update) (void) compUnredirectWindow (pClient, pChild, update); if (!csw->clients) { - xfree (csw); + free(csw); dixSetPrivate(&pWin->devPrivates, CompSubwindowsPrivateKey, 0); } - xfree (ccw); + free(ccw); return ret; } } @@ -391,7 +391,7 @@ compFreeClientSubwindows (WindowPtr pWin, XID id) for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib) (void) compUnredirectWindow (pClient, pChild, ccw->update); - xfree (ccw); + free(ccw); break; } } @@ -402,7 +402,7 @@ compFreeClientSubwindows (WindowPtr pWin, XID id) if (!csw->clients) { dixSetPrivate(&pWin->devPrivates, CompSubwindowsPrivateKey, NULL); - xfree (csw); + free(csw); } } |