diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2015-03-21 14:40:39 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2015-04-21 16:58:07 -0700 |
commit | 70f4a0e6bd18055cc9cb6685253bf5e07b125657 (patch) | |
tree | 5b398a4e03c7f3d23cd4ad72bdf0b281516bcbb8 /fb | |
parent | 4fe6b03b97ab8dbb32e4908e46be350d7f7d336f (diff) |
Convert exa & fb to new *allocarray functions
v2: fixup whitespace
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'fb')
-rw-r--r-- | fb/fbcopy.c | 2 | ||||
-rw-r--r-- | fb/fbpict.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fb/fbcopy.c b/fb/fbcopy.c index 5bbabc39f..6af10ccf7 100644 --- a/fb/fbcopy.c +++ b/fb/fbcopy.c @@ -194,7 +194,7 @@ fbCopyNto1(DrawablePtr pSrcDrawable, height = pbox->y2 - pbox->y1; tmpStride = ((width + FB_STIP_MASK) >> FB_STIP_SHIFT); - tmp = malloc(tmpStride * height * sizeof(FbStip)); + tmp = xallocarray(tmpStride * height, sizeof(FbStip)); if (!tmp) return; diff --git a/fb/fbpict.c b/fb/fbpict.c index c8378ad90..021f17883 100644 --- a/fb/fbpict.c +++ b/fb/fbpict.c @@ -124,7 +124,7 @@ fbGlyphs(CARD8 op, pixman_glyph_cache_freeze (glyphCache); if (n_glyphs > N_STACK_GLYPHS) { - if (!(pglyphs = malloc (n_glyphs * sizeof (pixman_glyph_t)))) + if (!(pglyphs = xallocarray(n_glyphs, sizeof(pixman_glyph_t)))) goto out; } |