aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.c
diff options
context:
space:
mode:
authorThomas Koenig <Thomas.Koenig@online.de>2005-05-12 17:50:33 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2005-05-12 17:50:33 +0000
commitc42a19d5e3a8236af3b727cd708bac22a8608b9d (patch)
tree35e0ae8368fc459238e0ba93fbf129aef6b0c137 /libgfortran/io/unix.c
parent7cc70b5e3c155ae457f89871dd7f644079f08a61 (diff)
downloadgcc-c42a19d5e3a8236af3b727cd708bac22a8608b9d.zip
gcc-c42a19d5e3a8236af3b727cd708bac22a8608b9d.tar.gz
gcc-c42a19d5e3a8236af3b727cd708bac22a8608b9d.tar.bz2
re PR libfortran/21324 (#undef GFC_CLEAR_MEMORY causes testsuite failures)
2005-05-12 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/21324 * runtime/memory.c: Don't define GFC_CLEAR_MEMORY (it's a performance hog). * io/open.c (new_unit): Zero freshly allocated memory for unit structure. * io/unit.c (init_units): Zero freshly allocated memory for STDIN, STDOUT and STDERR. * io/unix.c (open_internal): Zero freshly allocated memory for unix_stream. (fd_to_stream): Likewise. From-SVN: r99619
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r--libgfortran/io/unix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index 92eea53..2d8286c 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -872,6 +872,7 @@ open_internal (char *base, int length)
unix_stream *s;
s = get_mem (sizeof (unix_stream));
+ memset (s, '\0', sizeof (unix_stream));
s->buffer = base;
s->buffer_offset = 0;
@@ -900,6 +901,7 @@ fd_to_stream (int fd, int prot, int avoid_mmap)
unix_stream *s;
s = get_mem (sizeof (unix_stream));
+ memset (s, '\0', sizeof (unix_stream));
s->fd = fd;
s->buffer_offset = 0;