From 076bfcf612a1f774b214e335184d010b60bfad40 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 29 Aug 2000 22:41:42 +0000 Subject: Update. 2000-08-29 Ulrich Drepper * libio/iogetline.c: Set mode before the loop in case n==0. * libio/iogetwline.c: Likewise. 2000-08-29 H.J. Lu * libio/fileops.c (new_do_write): Check fp->_mode <= 0 instead of fp->_mode < 0. (_IO_new_file_overflow): Likewise. * libio/genops.c (_IO_flush_all): Likewise. * libio/ioftell.c (_IO_ftell): Likewise. --- libio/ioftell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libio/ioftell.c') diff --git a/libio/ioftell.c b/libio/ioftell.c index e8b6c7a..fa43b48 100644 --- a/libio/ioftell.c +++ b/libio/ioftell.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 95, 96, 97, 98, 99 Free Software Foundation, Inc. +/* Copyright (C) 1993, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -39,7 +39,7 @@ _IO_ftell (fp) pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0); if (_IO_in_backup (fp)) { - if (fp->_vtable_offset != 0 || fp->_mode < 0) + if (fp->_vtable_offset != 0 || fp->_mode <= 0) pos -= fp->_IO_save_end - fp->_IO_save_base; else /* XXX For now. */ -- cgit v1.1