diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2009-06-30 00:46:35 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2009-06-30 00:46:35 +0000 |
commit | 93ab3a3d79f363b09a7ef21fc20a2ecbf6f81308 (patch) | |
tree | 3f3564290ef646f413b78a6b1a75619aad41aa35 /libgfortran/io | |
parent | b94f4bef8b23eecdca3b8f83baddad1f21d74e3b (diff) | |
download | gcc-93ab3a3d79f363b09a7ef21fc20a2ecbf6f81308.zip gcc-93ab3a3d79f363b09a7ef21fc20a2ecbf6f81308.tar.gz gcc-93ab3a3d79f363b09a7ef21fc20a2ecbf6f81308.tar.bz2 |
re PR fortran/40576 (Endless loop in internal write)
2009-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40576
* io/transfer.c (sset): Adjust exit condition for loop.
From-SVN: r149075
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/transfer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 585ae43..4ad1cf0 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -2867,7 +2867,7 @@ sset (stream * s, int c, ssize_t nbyte) { trans = (bytes_left < WRITE_CHUNK) ? bytes_left : WRITE_CHUNK; trans = swrite (s, p, trans); - if (trans < 0) + if (trans <= 0) return trans; bytes_left -= trans; } |