summaryrefslogtreecommitdiff
path: root/dix/dispatch.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-10-06 14:19:30 -0400
committerAdam Jackson <ajax@redhat.com>2008-10-06 14:19:30 -0400
commit0b7b89fbac0b3865b2cf51295c68a5f4c7523f28 (patch)
treecf24e95113974c482e0cc1bbb6be19c8b25879e7 /dix/dispatch.c
parent9187f6ad9ec7ba9569a93d92561aac17eaa83491 (diff)
xalloc+bzero -> xcalloc
Diffstat (limited to 'dix/dispatch.c')
-rw-r--r--dix/dispatch.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 64cde4900..d14f8dce1 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -2875,18 +2875,16 @@ ProcCreateCursor (ClientPtr client)
return (BadMatch);
n = BitmapBytePad(width)*height;
- srcbits = (unsigned char *)xalloc(n);
+ srcbits = xcalloc(1, n);
if (!srcbits)
return (BadAlloc);
- mskbits = (unsigned char *)xalloc(n);
+ mskbits = xalloc(n);
if (!mskbits)
{
xfree(srcbits);
return (BadAlloc);
}
- /* zeroing the (pad) bits helps some ddx cursor handling */
- bzero((char *)srcbits, n);
(* src->drawable.pScreen->GetImage)( (DrawablePtr)src, 0, 0, width, height,
XYPixmap, 1, (pointer)srcbits);
if ( msk == (PixmapPtr)NULL)