From 06bb154df0a4d6e35885bce6a63057bd8f8636e8 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 2 Mar 2017 15:38:08 +0100 Subject: replace (DE)ALLOCATE_LOCAL by malloc/free This is basically a backport of the following commits + replacing xalloc/xfree by malloc/free. Fixes ArcticaProject/nx-libs#358. commit 2761c103311a1160bc483fd0367d654733df8598 Author: Daniel Stone Date: Mon Nov 5 14:03:26 2007 +0000 OS: Remove usage of alloca Replace with heap allocations. commit 5e363500c86042c394595e1a6633581eb8fcd1bb Author: Daniel Stone Date: Mon Nov 5 14:38:28 2007 +0000 OS: Remove ALLOCATE_LOCAL from os.h Remove ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK from os.h, and remove the include of Xalloca.h as well. --- nx-X11/programs/Xserver/mi/mifillrct.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'nx-X11/programs/Xserver/mi/mifillrct.c') diff --git a/nx-X11/programs/Xserver/mi/mifillrct.c b/nx-X11/programs/Xserver/mi/mifillrct.c index 197c2bf6a..ba1d29141 100644 --- a/nx-X11/programs/Xserver/mi/mifillrct.c +++ b/nx-X11/programs/Xserver/mi/mifillrct.c @@ -106,12 +106,12 @@ miPolyFillRect(pDrawable, pGC, nrectFill, prectInit) maxheight = max(maxheight, prect->height); } - pptFirst = (DDXPointPtr) ALLOCATE_LOCAL(maxheight * sizeof(DDXPointRec)); - pwFirst = (int *) ALLOCATE_LOCAL(maxheight * sizeof(int)); + pptFirst = (DDXPointPtr) malloc(maxheight * sizeof(DDXPointRec)); + pwFirst = (int *) malloc(maxheight * sizeof(int)); if(!pptFirst || !pwFirst) { - if (pwFirst) DEALLOCATE_LOCAL(pwFirst); - if (pptFirst) DEALLOCATE_LOCAL(pptFirst); + if (pwFirst) free(pwFirst); + if (pptFirst) free(pptFirst); return; } @@ -137,6 +137,6 @@ miPolyFillRect(pDrawable, pGC, nrectFill, prectInit) 1); prect++; } - DEALLOCATE_LOCAL(pwFirst); - DEALLOCATE_LOCAL(pptFirst); + free(pwFirst); + free(pptFirst); } -- cgit v1.2.3