mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-22 20:35:43 +00:00
fb: Remove usage of alloca
Replace with heap storage.
This commit is contained in:
parent
733d42065f
commit
34cdf06e4c
2 changed files with 13 additions and 13 deletions
10
fb/fbcopy.c
10
fb/fbcopy.c
|
|
@ -326,7 +326,7 @@ fbCopyRegion (DrawablePtr pSrcDrawable,
|
|||
if (nbox > 1)
|
||||
{
|
||||
/* keep ordering in each band, reverse order of bands */
|
||||
pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox);
|
||||
pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
|
||||
if(!pboxNew1)
|
||||
return;
|
||||
pboxBase = pboxNext = pbox+nbox-1;
|
||||
|
|
@ -363,11 +363,11 @@ fbCopyRegion (DrawablePtr pSrcDrawable,
|
|||
if (nbox > 1)
|
||||
{
|
||||
/* reverse order of rects in each band */
|
||||
pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox);
|
||||
pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
|
||||
if(!pboxNew2)
|
||||
{
|
||||
if (pboxNew1)
|
||||
DEALLOCATE_LOCAL(pboxNew1);
|
||||
xfree(pboxNew1);
|
||||
return;
|
||||
}
|
||||
pboxBase = pboxNext = pbox;
|
||||
|
|
@ -402,9 +402,9 @@ fbCopyRegion (DrawablePtr pSrcDrawable,
|
|||
reverse, upsidedown, bitPlane, closure);
|
||||
|
||||
if (pboxNew1)
|
||||
DEALLOCATE_LOCAL (pboxNew1);
|
||||
xfree (pboxNew1);
|
||||
if (pboxNew2)
|
||||
DEALLOCATE_LOCAL (pboxNew2);
|
||||
xfree (pboxNew2);
|
||||
}
|
||||
|
||||
RegionPtr
|
||||
|
|
|
|||
Loading…
Reference in a new issue