aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r--libgfortran/io/unix.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index f82ffa7..f4ee889 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -154,26 +154,22 @@ move_pos_offset (stream* st, int pos_off)
unix_stream * str = (unix_stream*)st;
if (pos_off < 0)
{
- str->active += pos_off;
- if (str->active < 0)
- str->active = 0;
+ str->logical_offset += pos_off;
- str->logical_offset += pos_off;
-
- if (str->dirty_offset+str->ndirty > str->logical_offset)
+ if (str->dirty_offset + str->ndirty > str->logical_offset)
{
- if (str->ndirty + pos_off > 0)
- str->ndirty += pos_off ;
+ if (str->ndirty + pos_off > 0)
+ str->ndirty += pos_off;
else
{
str->dirty_offset += pos_off + pos_off;
- str->ndirty = 0 ;
+ str->ndirty = 0;
}
}
- return pos_off ;
+ return pos_off;
}
- return 0 ;
+ return 0;
}