summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/pretty-print.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 42753bb417f..c0edeb6014f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-09-12 Ziemowit Laski <zlaski@apple.com>
+
+ * pretty-print.c (pp_construct): Use xcalloc instead of xmalloc
+ when allocating pp->buffer.
+
2003-09-12 Geoffrey Keating <geoffk@apple.com>
* config/darwin.c (machopic_select_rtx_section): Use
diff --git a/gcc/pretty-print.c b/gcc/pretty-print.c
index 421302ec722..43e440979c0 100644
--- a/gcc/pretty-print.c
+++ b/gcc/pretty-print.c
@@ -422,7 +422,7 @@ void
pp_construct (pretty_printer *pp, const char *prefix, int maximum_length)
{
memset (pp, 0, sizeof (pretty_printer));
- pp->buffer = xmalloc (sizeof (output_buffer));
+ pp->buffer = xcalloc (1, sizeof (output_buffer));
obstack_init (&pp->buffer->obstack);
pp->buffer->stream = stderr;
pp_line_cutoff (pp) = maximum_length;