From: Janne Blomqvist Date: Tue, 19 Apr 2011 18:18:08 +0000 (+0300) Subject: Use XCNEWVAR instead of xcalloc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f7d2e5d418d88cccfd1d54daebd57de464d9bd92;p=gcc.git Use XCNEWVAR instead of xcalloc From-SVN: r172730 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b4dabb46ac8..ca02edfa7b5 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2011-04-19 Janne Blomqvist + + * scanner.c (load_file): Use XCNEWVAR instead of xcalloc. + 2011-04-19 Janne Blomqvist * frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index f99429a7cc0..0c127d49e02 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -2012,8 +2012,8 @@ load_file (const char *realfilename, const char *displayedname, bool initial) /* Add line. */ - b = (gfc_linebuf *) xcalloc (1, gfc_linebuf_header_size - + (len + 1) * sizeof (gfc_char_t)); + b = XCNEWVAR (gfc_linebuf, gfc_linebuf_header_size + + (len + 1) * sizeof (gfc_char_t)); b->location = linemap_line_start (line_table, current_file->line++, 120);