mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-02 22:16:10 +00:00
xalloc+bzero -> xcalloc
This commit is contained in:
parent
9187f6ad9e
commit
0b7b89fbac
12 changed files with 19 additions and 58 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue