From 93acb62caabb343900fb68d3bd76dd36406a7ad4 Mon Sep 17 00:00:00 2001 From: Janne Blomqvist Date: Tue, 19 Apr 2011 20:42:51 +0300 Subject: Replace gfc_getmem with XCNEW, XCNEWVEC or xcalloc From-SVN: r172728 --- gcc/fortran/misc.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'gcc/fortran/misc.c') diff --git a/gcc/fortran/misc.c b/gcc/fortran/misc.c index a54ffc0..1274047 100644 --- a/gcc/fortran/misc.c +++ b/gcc/fortran/misc.c @@ -23,24 +23,6 @@ along with GCC; see the file COPYING3. If not see #include "system.h" #include "gfortran.h" -/* Get a block of memory. Many callers assume that the memory we - return is zeroed. */ - -void * -gfc_getmem (size_t n) -{ - void *p; - - if (n == 0) - return NULL; - - p = xmalloc (n); - if (p == NULL) - gfc_fatal_error ("Allocation would exceed memory limit -- malloc() failed"); - memset (p, 0, n); - return p; -} - /* Get terminal width. */ -- cgit v1.1