aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/io')
-rw-r--r--libgfortran/io/list_read.c2
-rw-r--r--libgfortran/io/transfer.c7
-rw-r--r--libgfortran/io/unix.c2
3 files changed, 7 insertions, 4 deletions
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index b11f6a5..879cf8f 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -164,7 +164,7 @@ next_char (st_parameter_dt *dtp)
check for NULL here is cautionary. */
if (p == NULL)
{
- generate_error (&dtp->common, ERROR_OS, NULL);
+ generate_error (&dtp->common, ERROR_INTERNAL_UNIT, NULL);
return '\0';
}
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 7ad1fffc..2c12294 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -1702,7 +1702,7 @@ next_record_r (st_parameter_dt *dtp)
record = record * dtp->u.p.current_unit->recl;
if (sseek (dtp->u.p.current_unit->s, record) == FAILURE)
{
- generate_error (&dtp->common, ERROR_OS, NULL);
+ generate_error (&dtp->common, ERROR_INTERNAL_UNIT, NULL);
break;
}
dtp->u.p.current_unit->bytes_left = dtp->u.p.current_unit->recl;
@@ -1863,7 +1863,10 @@ next_record_w (st_parameter_dt *dtp, int done)
record = record * dtp->u.p.current_unit->recl;
if (sseek (dtp->u.p.current_unit->s, record) == FAILURE)
- goto io_error;
+ {
+ generate_error (&dtp->common, ERROR_INTERNAL_UNIT, NULL);
+ return;
+ }
dtp->u.p.current_unit->bytes_left = dtp->u.p.current_unit->recl;
}
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index 6750b6f..237f09e 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -601,7 +601,7 @@ fd_truncate (unix_stream * s)
}
s->physical_offset = s->file_length = s->logical_offset;
-
+ s->active = 0;
return SUCCESS;
}