mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-03 03:24:39 +00:00
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:
parent
b9e665c8b2
commit
1c56ac63c0
34 changed files with 111 additions and 122 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue