From 0b7b89fbac0b3865b2cf51295c68a5f4c7523f28 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 6 Oct 2008 14:19:30 -0400 Subject: xalloc+bzero -> xcalloc --- render/glyph.c | 3 +-- render/render.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'render') diff --git a/render/glyph.c b/render/glyph.c index 849e65fce..ae04f6029 100644 --- a/render/glyph.c +++ b/render/glyph.c @@ -513,10 +513,9 @@ AllocateGlyphSet (int fdepth, PictFormatPtr format) } size = sizeof (GlyphSetRec); - glyphSet = xalloc (size); + glyphSet = xcalloc (1, size); if (!glyphSet) return FALSE; - bzero((char *)glyphSet, size); if (!AllocateGlyphHash (&glyphSet->hash, &glyphHashSets[0])) { diff --git a/render/render.c b/render/render.c index 1b7d78b87..9e04a137f 100644 --- a/render/render.c +++ b/render/render.c @@ -1571,21 +1571,19 @@ ProcRenderCreateCursor (ClientPtr client) stride = BitmapBytePad(width); nbytes_mono = stride*height; - srcbits = (unsigned char *)xalloc(nbytes_mono); + srcbits = xcalloc(nbytes_mono); if (!srcbits) { xfree (argbbits); return (BadAlloc); } - mskbits = (unsigned char *)xalloc(nbytes_mono); + mskbits = xcalloc(nbytes_mono); if (!mskbits) { xfree(argbbits); xfree(srcbits); return (BadAlloc); } - bzero ((char *) mskbits, nbytes_mono); - bzero ((char *) srcbits, nbytes_mono); if (pSrc->format == PICT_a8r8g8b8) { -- cgit v1.2.3