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 /Xi/xichangehierarchy.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 'Xi/xichangehierarchy.c')
-rw-r--r-- | Xi/xichangehierarchy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c index 1a06e4555..c1899e109 100644 --- a/Xi/xichangehierarchy.c +++ b/Xi/xichangehierarchy.c @@ -68,7 +68,7 @@ void XISendDeviceHierarchyEvent(int flags[MAXDEVICES]) if (!flags) return; - ev = xcalloc(1, sizeof(xXIHierarchyEvent) + + ev = calloc(1, sizeof(xXIHierarchyEvent) + MAXDEVICES * sizeof(xXIHierarchyInfo)); ev->type = GenericEvent; ev->extension = IReqCode; @@ -116,7 +116,7 @@ void XISendDeviceHierarchyEvent(int flags[MAXDEVICES]) dummyDev.id = XIAllDevices; SendEventToAllWindows(&dummyDev, (XI_HierarchyChangedMask >> 8), (xEvent*)ev, 1); - xfree(ev); + free(ev); } @@ -172,7 +172,7 @@ ProcXIChangeHierarchy(ClientPtr client) char* name; SWAPIF(swaps(&c->name_len, n)); - name = xcalloc(c->name_len + 1, sizeof(char)); + name = calloc(c->name_len + 1, sizeof(char)); strncpy(name, (char*)&c[1], c->name_len); @@ -181,7 +181,7 @@ ProcXIChangeHierarchy(ClientPtr client) TRUE); if (rc != Success) { - xfree(name); + free(name); goto unwind; } @@ -194,7 +194,7 @@ ProcXIChangeHierarchy(ClientPtr client) if (rc != Success) { - xfree(name); + free(name); goto unwind; } @@ -228,7 +228,7 @@ ProcXIChangeHierarchy(ClientPtr client) flags[XTestptr->id] |= XISlaveAttached; flags[XTestkeybd->id] |= XISlaveAttached; - xfree(name); + free(name); } break; case XIRemoveMaster: |