diff options
| author | marha <marha@users.sourceforge.net> | 2015-05-26 19:43:34 +0200 |
|---|---|---|
| committer | marha <marha@users.sourceforge.net> | 2015-05-26 19:43:34 +0200 |
| commit | 912e881bec8b16f2331225960645c3bdf5a8ba2d (patch) | |
| tree | 92afd568d4b3eaab1faf26d8d95d8c6df0173079 /xorg-server/exa | |
| parent | 2e00f3764228cfc91180bbe9375a8d85e0e65a5b (diff) | |
| parent | 843964ee791452b197e41dacb0146f5b456ffaa5 (diff) | |
| download | vcxsrv-912e881bec8b16f2331225960645c3bdf5a8ba2d.tar.gz vcxsrv-912e881bec8b16f2331225960645c3bdf5a8ba2d.tar.bz2 vcxsrv-912e881bec8b16f2331225960645c3bdf5a8ba2d.zip | |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mapi/glapi/glapi_priv.h
mesalib/src/mesa/drivers/dri/swrast/swrast.c
xorg-server/dix/dispatch.c
xorg-server/os/utils.c
xorg-server/record/record.c
Diffstat (limited to 'xorg-server/exa')
| -rw-r--r-- | xorg-server/exa/exa_accel.c | 8 | ||||
| -rw-r--r-- | xorg-server/exa/exa_glyphs.c | 4 | ||||
| -rw-r--r-- | xorg-server/exa/exa_migration_mixed.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/xorg-server/exa/exa_accel.c b/xorg-server/exa/exa_accel.c index ead77954d..c2b496993 100644 --- a/xorg-server/exa/exa_accel.c +++ b/xorg-server/exa/exa_accel.c @@ -386,7 +386,7 @@ exaHWCopyNtoN(DrawablePtr pSrcDrawable, exaGetDrawableDeltas(pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y); exaGetDrawableDeltas(pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y); - rects = malloc(nbox * sizeof(xRectangle)); + rects = xallocarray(nbox, sizeof(xRectangle)); if (rects) { int i; @@ -626,7 +626,7 @@ exaPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, return; } - prect = malloc(sizeof(xRectangle) * npt); + prect = xallocarray(npt, sizeof(xRectangle)); for (i = 0; i < npt; i++) { prect[i].x = ppt[i].x; prect[i].y = ppt[i].y; @@ -667,7 +667,7 @@ exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, return; } - prect = malloc(sizeof(xRectangle) * (npt - 1)); + prect = xallocarray(npt - 1, sizeof(xRectangle)); x1 = ppt[0].x; y1 = ppt[0].y; /* If we have any non-horizontal/vertical, fall back. */ @@ -738,7 +738,7 @@ exaPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg) } } - prect = malloc(sizeof(xRectangle) * nseg); + prect = xallocarray(nseg, sizeof(xRectangle)); for (i = 0; i < nseg; i++) { if (pSeg[i].x1 < pSeg[i].x2) { prect[i].x = pSeg[i].x1; diff --git a/xorg-server/exa/exa_glyphs.c b/xorg-server/exa/exa_glyphs.c index 41f3694f2..cf21ea914 100644 --- a/xorg-server/exa/exa_glyphs.c +++ b/xorg-server/exa/exa_glyphs.c @@ -211,8 +211,8 @@ exaRealizeGlyphCaches(ScreenPtr pScreen, unsigned int format) cache->picture = pPicture; cache->picture->refcnt++; - cache->hashEntries = malloc(sizeof(int) * cache->hashSize); - cache->glyphs = malloc(sizeof(ExaCachedGlyphRec) * cache->size); + cache->hashEntries = xallocarray(cache->hashSize, sizeof(int)); + cache->glyphs = xallocarray(cache->size, sizeof(ExaCachedGlyphRec)); cache->glyphCount = 0; if (!cache->hashEntries || !cache->glyphs) diff --git a/xorg-server/exa/exa_migration_mixed.c b/xorg-server/exa/exa_migration_mixed.c index cf66327b3..7d3fca7c0 100644 --- a/xorg-server/exa/exa_migration_mixed.c +++ b/xorg-server/exa/exa_migration_mixed.c @@ -205,8 +205,8 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg) /* Do we need to allocate our system buffer? */ if (!pExaPixmap->sys_ptr) { - pExaPixmap->sys_ptr = malloc(pExaPixmap->sys_pitch * - pPixmap->drawable.height); + pExaPixmap->sys_ptr = xallocarray(pExaPixmap->sys_pitch, + pPixmap->drawable.height); if (!pExaPixmap->sys_ptr) FatalError("EXA: malloc failed for size %d bytes\n", pExaPixmap->sys_pitch * pPixmap->drawable.height); |
