diff options
author | Eric Anholt <eric@anholt.net> | 2010-06-04 16:04:37 -0700 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2010-06-07 21:06:49 +0100 |
commit | ae9f6675da8663d3b2706c7975c6160fea23f676 (patch) | |
tree | c703ed4ba9a6e53aa0ba705bc29b58473a4f4477 /uxa | |
parent | 8e7aaa46ce788c7661654868659894a42efb836d (diff) |
Use libc instead of deprecated libc wrappers for malloc/calloc/free.
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
(cherrypick of part of this commit came from
2c1fda08e889cad07acb452230da06f9c383d21c by eric anholt)
Diffstat (limited to 'uxa')
-rw-r--r-- | uxa/uxa-accel.c | 14 | ||||
-rw-r--r-- | uxa/uxa-glyphs.c | 10 | ||||
-rw-r--r-- | uxa/uxa-render.c | 4 | ||||
-rw-r--r-- | uxa/uxa.c | 8 |
4 files changed, 18 insertions, 18 deletions
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c index 81e8fd72..c20ac8c1 100644 --- a/uxa/uxa-accel.c +++ b/uxa/uxa-accel.c @@ -720,7 +720,7 @@ uxa_poly_point(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, return; } - prect = xalloc(sizeof(xRectangle) * npt); + prect = malloc(sizeof(xRectangle) * npt); if (!prect) return; for (i = 0; i < npt; i++) { @@ -734,7 +734,7 @@ uxa_poly_point(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, prect[i].height = 1; } pGC->ops->PolyFillRect(pDrawable, pGC, npt, prect); - xfree(prect); + free(prect); } /** @@ -757,7 +757,7 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, return; } - prect = xalloc(sizeof(xRectangle) * (npt - 1)); + prect = malloc(sizeof(xRectangle) * (npt - 1)); if (!prect) return; x1 = ppt[0].x; @@ -773,7 +773,7 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, } if (x1 != x2 && y1 != y2) { - xfree(prect); + free(prect); uxa_check_poly_lines(pDrawable, pGC, mode, npt, ppt); return; } @@ -797,7 +797,7 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, y1 = y2; } pGC->ops->PolyFillRect(pDrawable, pGC, npt - 1, prect); - xfree(prect); + free(prect); } /** @@ -826,7 +826,7 @@ uxa_poly_segment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg) } } - prect = xalloc(sizeof(xRectangle) * nseg); + prect = malloc(sizeof(xRectangle) * nseg); if (!prect) return; for (i = 0; i < nseg; i++) { @@ -854,7 +854,7 @@ uxa_poly_segment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg) } } pGC->ops->PolyFillRect(pDrawable, pGC, nseg, prect); - xfree(prect); + free(prect); } static Bool uxa_fill_region_solid(DrawablePtr pDrawable, RegionPtr pRegion, diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c index 10d9447c..e6d87bd9 100644 --- a/uxa/uxa-glyphs.c +++ b/uxa/uxa-glyphs.c @@ -110,7 +110,7 @@ static void uxa_unrealize_glyph_caches(ScreenPtr pScreen) FreePicture(cache->picture, 0); if (cache->glyphs) - xfree(cache->glyphs); + free(cache->glyphs); } } @@ -171,7 +171,7 @@ static Bool uxa_realize_glyph_caches(ScreenPtr pScreen) ValidatePicture(picture); cache->picture = picture; - cache->glyphs = xcalloc(sizeof(GlyphPtr), GLYPH_CACHE_SIZE); + cache->glyphs = calloc(sizeof(GlyphPtr), GLYPH_CACHE_SIZE); if (!cache->glyphs) goto bail; @@ -285,7 +285,7 @@ uxa_glyph_unrealize(ScreenPtr pScreen, priv->cache->glyphs[priv->pos] = NULL; uxa_glyph_set_private(pGlyph, NULL); - xfree(priv); + free(priv); } /* Cut and paste from render/glyph.c - probably should export it instead */ @@ -587,7 +587,7 @@ uxa_glyph_cache(ScreenPtr screen, GlyphPtr glyph, int *out_x, int *out_y) GlyphPtr evicted = cache->glyphs[pos + s]; if (evicted != NULL) { if (priv != NULL) - xfree(priv); + free(priv); priv = uxa_glyph_get_private(evicted); uxa_glyph_set_private(evicted, NULL); @@ -601,7 +601,7 @@ uxa_glyph_cache(ScreenPtr screen, GlyphPtr glyph, int *out_x, int *out_y) } if (priv == NULL) { - priv = xalloc(sizeof(struct uxa_glyph)); + priv = malloc(sizeof(struct uxa_glyph)); if (priv == NULL) return NULL; } diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c index 8c163f6e..c2c3f68f 100644 --- a/uxa/uxa-render.c +++ b/uxa/uxa-render.c @@ -870,7 +870,7 @@ _pixman_region_init_rectangles(pixman_region16_t *region, int i; if (num_rects > sizeof(stack_boxes) / sizeof(stack_boxes[0])) { - boxes = xalloc(sizeof(pixman_box16_t) * num_rects); + boxes = malloc(sizeof(pixman_box16_t) * num_rects); if (boxes == NULL) return FALSE; } @@ -885,7 +885,7 @@ _pixman_region_init_rectangles(pixman_region16_t *region, ret = pixman_region_init_rects(region, boxes, num_rects); if (boxes != stack_boxes) - xfree(boxes); + free(boxes); return ret; } @@ -398,7 +398,7 @@ static Bool uxa_close_screen(int i, ScreenPtr pScreen) } #endif - xfree(uxa_screen); + free(uxa_screen); return (*pScreen->CloseScreen) (i, pScreen); } @@ -409,13 +409,13 @@ static Bool uxa_close_screen(int i, ScreenPtr pScreen) * without breaking ABI between UXA and the drivers. The driver's * responsibility is to check beforehand that the UXA module has a matching * major number and sufficient minor. Drivers are responsible for freeing the - * driver structure using xfree(). + * driver structure using free(). * * @return a newly allocated, zero-filled driver structure */ uxa_driver_t *uxa_driver_alloc(void) { - return xcalloc(1, sizeof(uxa_driver_t)); + return calloc(1, sizeof(uxa_driver_t)); } /** @@ -460,7 +460,7 @@ Bool uxa_driver_init(ScreenPtr screen, uxa_driver_t * uxa_driver) "non-NULL\n", screen->myNum); return FALSE; } - uxa_screen = xcalloc(sizeof(uxa_screen_t), 1); + uxa_screen = calloc(sizeof(uxa_screen_t), 1); if (!uxa_screen) { LogMessage(X_WARNING, |