diff options
author | Adam Jackson <ajax@redhat.com> | 2008-10-06 14:19:30 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-10-06 14:19:30 -0400 |
commit | 0b7b89fbac0b3865b2cf51295c68a5f4c7523f28 (patch) | |
tree | cf24e95113974c482e0cc1bbb6be19c8b25879e7 /render | |
parent | 9187f6ad9ec7ba9569a93d92561aac17eaa83491 (diff) |
xalloc+bzero -> xcalloc
Diffstat (limited to 'render')
-rw-r--r-- | render/glyph.c | 3 | ||||
-rw-r--r-- | render/render.c | 6 |
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) { |