about summary refs log tree commit diff
path: root/libio/iogetline.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iogetline.c')
-rw-r--r--libio/iogetline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libio/iogetline.c b/libio/iogetline.c
index 328e20e6ea..9b49039f58 100644
--- a/libio/iogetline.c
+++ b/libio/iogetline.c
@@ -59,7 +59,7 @@ _IO_getline_info (fp, buf, n, delim, extract_delim, eof)
   char *ptr = buf;
   if (eof != NULL)
     *eof = 0;
-  do
+  while (n != 0);
     {
       _IO_ssize_t len = fp->_IO_read_end - fp->_IO_read_ptr;
       if (len <= 0)
@@ -108,7 +108,7 @@ _IO_getline_info (fp, buf, n, delim, extract_delim, eof)
 	    ptr += len;
 	    n -= len;
 	  }
-    } while (n != 0);
+    }
   return ptr - buf;
 }