summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-19 18:18:08 +0000
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-19 18:18:08 +0000
commit72a767e4590071167dfc11060a311dfe2c916f50 (patch)
tree56748efb9f39e18ae2c80ea30f5ada095403d4e6
parent1e9c54334183b2eaf4dbc7b79bd82f854eb53e56 (diff)
downloadgcc-72a767e4590071167dfc11060a311dfe2c916f50.tar.gz
Use XCNEWVAR instead of xcalloc
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172730 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fortran/ChangeLog4
-rw-r--r--gcc/fortran/scanner.c4
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,5 +1,9 @@
2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
+ * scanner.c (load_file): Use XCNEWVAR instead of xcalloc.
+
+2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
+
* frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of
free.
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);