summaryrefslogtreecommitdiff
path: root/cfb/cfbpixmap.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2007-11-05 14:14:04 +0000
committerDaniel Stone <daniel@fooishbar.org>2007-11-05 14:34:45 +0000
commitca75261beedc3e00767b3812a81b7dac4437f4a1 (patch)
tree39e66fdde5253d6b3826f4149c9618ee29bbf2ea /cfb/cfbpixmap.c
parent914922fd6100a409a3dfd1c64511ed6bdc344bef (diff)
cfb: Remove usage of alloca
Replace with xalloc/xfree.
Diffstat (limited to 'cfb/cfbpixmap.c')
-rw-r--r--cfb/cfbpixmap.c8
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