mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-19 00:51:16 +00:00
xalloc+bzero -> xcalloc
This commit is contained in:
parent
9187f6ad9e
commit
0b7b89fbac
12 changed files with 19 additions and 58 deletions
|
|
@ -1516,12 +1516,11 @@ AddExtensionClient(WindowPtr pWin, ClientPtr client, Mask mask, int mskidx)
|
|||
|
||||
if (!pWin->optional && !MakeWindowOptional(pWin))
|
||||
return BadAlloc;
|
||||
others = (InputClients *) xalloc(sizeof(InputClients));
|
||||
others = xcalloc(1, sizeof(InputClients));
|
||||
if (!others)
|
||||
return BadAlloc;
|
||||
if (!pWin->optional->inputMasks && !MakeInputMasks(pWin))
|
||||
return BadAlloc;
|
||||
bzero((char *)&others->mask[0], sizeof(Mask) * EMASKSIZE);
|
||||
others->mask[mskidx] = mask;
|
||||
others->resource = FakeClientID(client->index);
|
||||
others->next = pWin->optional->inputMasks->inputClients;
|
||||
|
|
@ -1536,11 +1535,9 @@ MakeInputMasks(WindowPtr pWin)
|
|||
{
|
||||
struct _OtherInputMasks *imasks;
|
||||
|
||||
imasks = (struct _OtherInputMasks *)
|
||||
xalloc(sizeof(struct _OtherInputMasks));
|
||||
imasks = xcalloc(1, sizeof(struct _OtherInputMasks));
|
||||
if (!imasks)
|
||||
return FALSE;
|
||||
bzero((char *)imasks, sizeof(struct _OtherInputMasks));
|
||||
pWin->optional->inputMasks = imasks;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue