DIX: Remove usage of alloca

Replace with heap allocations.
This commit is contained in:
Daniel Stone 2007-11-05 14:12:59 +00:00
commit 914922fd61
8 changed files with 57 additions and 57 deletions

View file

@ -1997,7 +1997,7 @@ ProcGetMotionEvents(ClientPtr client)
{
if (CompareTimeStamps(stop, currentTime) == LATER)
stop = currentTime;
coords = (xTimecoord *)ALLOCATE_LOCAL(mouse->valuator->numMotionEvents
coords = (xTimecoord *)xalloc(mouse->valuator->numMotionEvents
* sizeof(xTimecoord));
if (!coords)
return BadAlloc;
@ -2031,7 +2031,7 @@ ProcGetMotionEvents(ClientPtr client)
(char *)coords);
}
if (coords)
DEALLOCATE_LOCAL(coords);
xfree(coords);
return Success;
}