[PATCH 13/17] Convert glamor & glx to new *allocarray functions
Michel Dänzer
michel at daenzer.net
Tue Mar 31 19:27:48 PDT 2015
On 01.04.2015 09:50, Alan Coopersmith wrote:
> diff --git a/glamor/glamor_utils.c b/glamor/glamor_utils.c
> index f068960..1c32cab 100644
> --- a/glamor/glamor_utils.c
> +++ b/glamor/glamor_utils.c
> @@ -31,7 +31,7 @@ glamor_solid_boxes(PixmapPtr pixmap,
> xRectangle *rect;
> int n;
>
> - rect = malloc(nbox * sizeof (xRectangle));
> + rect = xallocarray(nbox, sizeof (xRectangle));
You could drop the space between sizeof and the parenthesis while you're
at it. With that fixed,
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the xorg-devel
mailing list