diff options
author | Daniel Stone <daniel@fooishbar.org> | 2007-11-05 14:14:04 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2007-11-05 14:34:45 +0000 |
commit | ca75261beedc3e00767b3812a81b7dac4437f4a1 (patch) | |
tree | 39e66fdde5253d6b3826f4149c9618ee29bbf2ea /cfb/cfbpixmap.c | |
parent | 914922fd6100a409a3dfd1c64511ed6bdc344bef (diff) |
cfb: Remove usage of alloca
Replace with xalloc/xfree.
Diffstat (limited to 'cfb/cfbpixmap.c')
-rw-r--r-- | cfb/cfbpixmap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cfb/cfbpixmap.c b/cfb/cfbpixmap.c index 36ed5724d..a7be7cc1b 100644 --- a/cfb/cfbpixmap.c +++ b/cfb/cfbpixmap.c @@ -270,7 +270,7 @@ cfbXRotatePixmap(pPix, rw) int size, tsize; tsize = PixmapBytePad(pPix->drawable.width - rot, pPix->drawable.depth); - pwTmp = (CfbBits *) ALLOCATE_LOCAL(pPix->drawable.height * tsize); + pwTmp = (CfbBits *) xalloc(pPix->drawable.height * tsize); if (!pwTmp) return; /* divide pw (the pixmap) in two vertically at (w - rot) and swap */ @@ -288,7 +288,7 @@ cfbXRotatePixmap(pPix, rw) 0, 0, rot, 0, (int)pPix->drawable.width - rot, (int)pPix->drawable.height, tsize, size); - DEALLOCATE_LOCAL(pwTmp); + xfree(pwTmp); #endif } } @@ -328,13 +328,13 @@ cfbYRotatePixmap(pPix, rh) nbyDown = rot * pPix->devKind; nbyUp = (pPix->devKind * pPix->drawable.height) - nbyDown; - if(!(ptmp = (char *)ALLOCATE_LOCAL(nbyUp))) + if(!(ptmp = (char *)xalloc(nbyUp))) return; memmove(ptmp, pbase, nbyUp); /* save the low rows */ memmove(pbase, pbase+nbyUp, nbyDown); /* slide the top rows down */ memmove(pbase+nbyDown, ptmp, nbyUp); /* move lower rows up to row rot */ - DEALLOCATE_LOCAL(ptmp); + xfree(ptmp); } void |