From 1c56ac63c040280498c4a9d67b48c35b60070821 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 21 Mar 2015 13:42:12 -0700 Subject: Convert top level extensions to new *allocarray functions v2: remove now useless parentheses Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner --- composite/compinit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'composite') 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; -- cgit v1.2.1