From 755f55b0dbb0ffadc0acf020123c727dcf558354 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 19 Dec 1995 10:00:22 +0000 Subject: Mon Dec 18 13:40:37 1995 Roland McGrath * stdio/fread.c: Don't increment __offset when it's -1. * elf/rtld.c (dl_main): Prepend tab to "statically linked". Exit 0 in that case. * misc/err.c (vwarnx, vwarn): Fix major brainos. * sysdeps/mach/hurd/dl-sysdep.c (mmap): Fix setting of inheritance. --- stdio/fread.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'stdio') diff --git a/stdio/fread.c b/stdio/fread.c index 347e8446e1..d2766f6616 100644 --- a/stdio/fread.c +++ b/stdio/fread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -95,8 +95,11 @@ DEFUN(fread, (p, size, nmemb, stream), if (count > 0) { to_read -= count; - stream->__offset += count; - stream->__target += count; + if (stream->__offset != -1) + { + stream->__offset += count; + stream->__target += count; + } ptr += count; } else if (count == 0) -- cgit v1.2.3