pretty-print.c (pp_construct): Use xcalloc instead of xmalloc when allocating pp->buffer.

2003-09-12  Ziemowit Laski  <zlaski@apple.com>

        * pretty-print.c (pp_construct): Use xcalloc instead of xmalloc
        when allocating pp->buffer.

From-SVN: r71346
This commit is contained in:
Ziemowit Laski 2003-09-12 23:47:01 +00:00 committed by Ziemowit Laski
parent 2e53734e19
commit c4555dd942
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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;