]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pretty-print.c (pp_construct): Use xcalloc instead of xmalloc when allocating pp...
authorZiemowit Laski <zlaski@apple.com>
Fri, 12 Sep 2003 23:47:01 +0000 (23:47 +0000)
committerZiemowit Laski <zlaski@gcc.gnu.org>
Fri, 12 Sep 2003 23:47:01 +0000 (23:47 +0000)
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

gcc/ChangeLog
gcc/pretty-print.c

index 42753bb417f197ec1c86926938c1035ec21fd2d8..c0edeb6014f7fc807fec4b0a696b04e230308e53 100644 (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
index 421302ec72234845730cff499c5649c0a743290c..43e440979c09e64abe60764149f0ccf208330234 100644 (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;