diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2015-03-21 14:58:50 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2015-04-21 16:58:08 -0700 |
commit | 7ac280287491fe06127d9fefc504217e21c780e6 (patch) | |
tree | d86d2eb383f27378e6e6867fba3aa80290c7bd18 /mi/mizerline.c | |
parent | 70f4a0e6bd18055cc9cb6685253bf5e07b125657 (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/mizerline.c')
-rw-r--r-- | mi/mizerline.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mi/mizerline.c b/mi/mizerline.c index 5a2447014..2f22d2309 100644 --- a/mi/mizerline.c +++ b/mi/mizerline.c @@ -150,8 +150,8 @@ miZeroLine(DrawablePtr pDraw, GCPtr pGC, int mode, /* Origin or Previous */ width = xright - xleft + 1; height = ybottom - ytop + 1; list_len = (height >= width) ? height : width; - pspanInit = malloc(list_len * sizeof(DDXPointRec)); - pwidthInit = malloc(list_len * sizeof(int)); + pspanInit = xallocarray(list_len, sizeof(DDXPointRec)); + pwidthInit = xallocarray(list_len, sizeof(int)); if (!pspanInit || !pwidthInit) { free(pspanInit); free(pwidthInit); |