diff src/console-stream.c @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents fe104dbd9147
children a2f645c6b9f8
line wrap: on
line diff
--- a/src/console-stream.c	Mon Aug 13 09:54:24 2007 +0200
+++ b/src/console-stream.c	Mon Aug 13 09:55:28 2007 +0200
@@ -47,11 +47,7 @@
 static void
 allocate_stream_console_struct (struct console *con)
 {
-  con->console_data =
-    (struct stream_console *) xmalloc (sizeof (struct stream_console));
-
-  /* zero out all slots. */
-  memset (con->console_data, 0, sizeof (struct stream_console));
+  con->console_data = xnew_and_zero (struct stream_console);
 }
 
 static void
@@ -114,7 +110,7 @@
 stream_delete_console (struct console *con)
 {
   if (/* CONSOLE_STREAM_DATA (con)->needs_newline */
-      stdout_needs_newline) /* #### clean this up */    
+      stdout_needs_newline) /* #### clean this up */
     {
       fputc ('\n', CONSOLE_STREAM_DATA (con)->outfd);
       fflush (CONSOLE_STREAM_DATA (con)->outfd);