summaryrefslogtreecommitdiff
path: root/Xi
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 /Xi
parent9187f6ad9ec7ba9569a93d92561aac17eaa83491 (diff)
xalloc+bzero -> xcalloc
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index d59a87d1a..6f652794f 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -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;
}