diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2015-03-21 13:42:12 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2015-04-21 16:57:08 -0700 |
commit | 1c56ac63c040280498c4a9d67b48c35b60070821 (patch) | |
tree | ab1073d348cb1acf0523ede3e1f2fa73f3b5fdb6 /Xext/sync.c | |
parent | b9e665c8b2f048feb3064ce412e0b3e9eb6797b0 (diff) |
Convert top level extensions to new *allocarray functions
v2: remove now useless parentheses
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'Xext/sync.c')
-rw-r--r-- | Xext/sync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Xext/sync.c b/Xext/sync.c index ba08cd1bb..41405619c 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -620,7 +620,7 @@ SyncAwaitTriggerFired(SyncTrigger * pTrigger) pAwaitUnion = (SyncAwaitUnion *) pAwait->pHeader; numwaits = pAwaitUnion->header.num_waitconditions; - ppAwait = malloc(numwaits * sizeof(SyncAwait *)); + ppAwait = xallocarray(numwaits, sizeof(SyncAwait *)); if (!ppAwait) goto bail; @@ -1514,7 +1514,7 @@ SyncAwaitPrologue(ClientPtr client, int items) /* all the memory for the entire await list is allocated * here in one chunk */ - pAwaitUnion = malloc((items + 1) * sizeof(SyncAwaitUnion)); + pAwaitUnion = xallocarray(items + 1, sizeof(SyncAwaitUnion)); if (!pAwaitUnion) return NULL; |