summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/glyph.c3
-rw-r--r--render/render.c6
2 files changed, 3 insertions, 6 deletions
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)
{