summaryrefslogtreecommitdiff
path: root/composite
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2015-03-21 13:42:12 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2015-04-21 16:57:08 -0700
commit1c56ac63c040280498c4a9d67b48c35b60070821 (patch)
treeab1073d348cb1acf0523ede3e1f2fa73f3b5fdb6 /composite
parentb9e665c8b2f048feb3064ce412e0b3e9eb6797b0 (diff)
downloadxserver-1c56ac63c040280498c4a9d67b48c35b60070821.tar.gz
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 'composite')
-rw-r--r--composite/compinit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/composite/compinit.c b/composite/compinit.c
index 3ac075a46..cf61f2a57 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -223,8 +223,8 @@ compRegisterAlternateVisuals(CompScreenPtr cs, VisualID * vids, int nVisuals)
{
VisualID *p;
- p = realloc(cs->alternateVisuals,
- sizeof(VisualID) * (cs->numAlternateVisuals + nVisuals));
+ p = reallocarray(cs->alternateVisuals,
+ cs->numAlternateVisuals + nVisuals, sizeof(VisualID));
if (p == NULL)
return FALSE;
@@ -253,8 +253,8 @@ CompositeRegisterImplicitRedirectionException(ScreenPtr pScreen,
CompScreenPtr cs = GetCompScreen(pScreen);
CompImplicitRedirectException *p;
- p = realloc(cs->implicitRedirectExceptions,
- sizeof(p[0]) * (cs->numImplicitRedirectExceptions + 1));
+ p = reallocarray(cs->implicitRedirectExceptions,
+ cs->numImplicitRedirectExceptions + 1, sizeof(p[0]));
if (p == NULL)
return FALSE;