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/xfree86/ramdac/xf86HWCurs.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/xfree86/ramdac/xf86HWCurs.c')
-rw-r--r-- | hw/xfree86/ramdac/xf86HWCurs.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c index 4374e51d4..dd2b78f98 100644 --- a/hw/xfree86/ramdac/xf86HWCurs.c +++ b/hw/xfree86/ramdac/xf86HWCurs.c @@ -247,7 +247,7 @@ RealizeCursorInterleave0(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) int words = size / (CUR_BITMAP_SCANLINE_PAD / 4); - if (!(mem = xcalloc(1, size))) + if (!(mem = calloc(1, size))) return NULL; if (pCurs == NullCursor) { @@ -354,8 +354,8 @@ RealizeCursorInterleave1(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; - if (!(mem = xcalloc(1, size))) { - xfree(mem2); + if (!(mem = calloc(1, size))) { + free(mem2); return NULL; } @@ -379,7 +379,7 @@ RealizeCursorInterleave1(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) } /* Free the uninterleaved cursor */ - xfree(mem2); + free(mem2); return mem; } @@ -397,8 +397,8 @@ RealizeCursorInterleave8(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; - if (!(mem = xcalloc(1, size))) { - xfree(mem2); + if (!(mem = calloc(1, size))) { + free(mem2); return NULL; } @@ -414,7 +414,7 @@ RealizeCursorInterleave8(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) } /* Free the uninterleaved cursor */ - xfree(mem2); + free(mem2); return mem; } @@ -432,8 +432,8 @@ RealizeCursorInterleave16(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; - if (!(mem = xcalloc(1, size))) { - xfree(mem2); + if (!(mem = calloc(1, size))) { + free(mem2); return NULL; } @@ -449,7 +449,7 @@ RealizeCursorInterleave16(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) } /* Free the uninterleaved cursor */ - xfree(mem2); + free(mem2); return mem; } @@ -467,8 +467,8 @@ RealizeCursorInterleave32(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; - if (!(mem = xcalloc(1, size))) { - xfree(mem2); + if (!(mem = calloc(1, size))) { + free(mem2); return NULL; } @@ -484,7 +484,7 @@ RealizeCursorInterleave32(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) } /* Free the uninterleaved cursor */ - xfree(mem2); + free(mem2); return mem; } @@ -502,8 +502,8 @@ RealizeCursorInterleave64(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; - if (!(mem = xcalloc(1, size))) { - xfree(mem2); + if (!(mem = calloc(1, size))) { + free(mem2); return NULL; } @@ -521,7 +521,7 @@ RealizeCursorInterleave64(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) } /* Free the uninterleaved cursor */ - xfree(mem2); + free(mem2); return mem; } |