This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bug in fstream get(Ch *p, streamsize n, Ch term )


Hi, Ulrich,

This is for

http://www.cygnus.com/ml/egcs-bugs/1998-Aug/0504.html

I think we should fix egcs, glibc 2.0 and glibc 2.1.

Thanks.


-- 
H.J. Lu (hjl@gnu.org)
----
--- libio/iogetline.c.orig	Tue Aug 25 14:15:23 1998
+++ libio/iogetline.c	Tue Aug 25 14:16:14 1998
@@ -58,7 +58,7 @@ _IO_getline_info (fp, buf, n, delim, ext
 {
   char *ptr = buf;
   if (eof) *eof = 0;
-  do
+  while (n != 0)
     {
       _IO_ssize_t len = fp->_IO_read_end - fp->_IO_read_ptr;
       if (len <= 0)
@@ -105,7 +105,7 @@ _IO_getline_info (fp, buf, n, delim, ext
 	    ptr += len;
 	    n -= len;
 	  }
-    } while (n != 0);
+    }
   return ptr - buf;
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]