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>
This commit is contained in:
Alan Coopersmith 2015-03-21 13:42:12 -07:00
commit 1c56ac63c0
34 changed files with 111 additions and 122 deletions

View file

@ -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;