From f7d2e5d418d88cccfd1d54daebd57de464d9bd92 Mon Sep 17 00:00:00 2001 From: Janne Blomqvist Date: Tue, 19 Apr 2011 21:18:08 +0300 Subject: [PATCH] Use XCNEWVAR instead of xcalloc From-SVN: r172730 --- gcc/fortran/ChangeLog | 4 ++++ gcc/fortran/scanner.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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); -- 2.30.2