summaryrefslogtreecommitdiff
path: root/mi/mipoly.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2015-03-21 14:58:50 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2015-04-21 16:58:08 -0700
commit7ac280287491fe06127d9fefc504217e21c780e6 (patch)
treed86d2eb383f27378e6e6867fba3aa80290c7bd18 /mi/mipoly.c
parent70f4a0e6bd18055cc9cb6685253bf5e07b125657 (diff)
Convert mi & miext 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 'mi/mipoly.c')
-rw-r--r--mi/mipoly.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mi/mipoly.c b/mi/mipoly.c
index a332376d1..a97e2bb64 100644
--- a/mi/mipoly.c
+++ b/mi/mipoly.c
@@ -412,8 +412,8 @@ miFillConvexPoly(DrawablePtr dst, GCPtr pgc, int count, DDXPointPtr ptsIn)
dy = ymax - ymin + 1;
if ((count < 3) || (dy < 0))
return TRUE;
- ptsOut = FirstPoint = malloc(sizeof(DDXPointRec) * dy);
- width = FirstWidth = malloc(sizeof(int) * dy);
+ ptsOut = FirstPoint = xallocarray(dy, sizeof(DDXPointRec));
+ width = FirstWidth = xallocarray(dy, sizeof(int));
if (!FirstPoint || !FirstWidth) {
free(FirstWidth);
free(FirstPoint);