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 /hw/xquartz/applewm.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 'hw/xquartz/applewm.c')
-rw-r--r-- | hw/xquartz/applewm.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c index 15c86de00..8750f5d00 100644 --- a/hw/xquartz/applewm.c +++ b/hw/xquartz/applewm.c @@ -229,7 +229,7 @@ WMFreeClient (pointer data, XID id) { } updateEventMask (pHead); } - xfree ((pointer) pEvent); + free((pointer) pEvent); return 1; } @@ -242,9 +242,9 @@ WMFreeEvents (pointer data, XID id) { for (pCur = *pHead; pCur; pCur = pNext) { pNext = pCur->next; FreeResource (pCur->clientResource, ClientType); - xfree ((pointer) pCur); + free((pointer) pCur); } - xfree ((pointer) pHead); + free((pointer) pHead); eventMask = 0; return 1; } @@ -274,7 +274,7 @@ ProcAppleWMSelectInput (register ClientPtr client) } /* build the entry */ - pNewEvent = (WMEventPtr) xalloc (sizeof (WMEventRec)); + pNewEvent = (WMEventPtr) malloc(sizeof (WMEventRec)); if (!pNewEvent) return BadAlloc; pNewEvent->next = 0; @@ -296,7 +296,7 @@ ProcAppleWMSelectInput (register ClientPtr client) */ if (i != Success || !pHead) { - pHead = (WMEventPtr *) xalloc (sizeof (WMEventPtr)); + pHead = (WMEventPtr *) malloc(sizeof (WMEventPtr)); if (!pHead || !AddResource (eventResource, EventType, (pointer)pHead)) { @@ -323,7 +323,7 @@ ProcAppleWMSelectInput (register ClientPtr client) pNewEvent->next = pEvent->next; else *pHead = pEvent->next; - xfree (pEvent); + free(pEvent); updateEventMask (pHead); } } @@ -414,8 +414,8 @@ ProcAppleWMSetWindowMenu( REQUEST_AT_LEAST_SIZE(xAppleWMSetWindowMenuReq); nitems = stuff->nitems; - items = xalloc (sizeof (char *) * nitems); - shortcuts = xalloc (sizeof (char) * nitems); + items = malloc(sizeof (char *) * nitems); + shortcuts = malloc(sizeof (char) * nitems); max_len = (stuff->length << 2) - sizeof(xAppleWMSetWindowMenuReq); bytes = (char *) &stuff[1]; |