about summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-07-08 04:41:34 +0000
committerUlrich Drepper <drepper@redhat.com>2007-07-08 04:41:34 +0000
commit0923a2c896f09795cca4a6d800a336a56b0ee42c (patch)
tree10038ab54362ef2ee4ab5384e39dacce92d18d9e /libio
parente9055017f6d2015c4c74c94b1c2bf59968db223f (diff)
downloadglibc-0923a2c896f09795cca4a6d800a336a56b0ee42c.tar.gz
glibc-0923a2c896f09795cca4a6d800a336a56b0ee42c.tar.xz
glibc-0923a2c896f09795cca4a6d800a336a56b0ee42c.zip
* stdio-common/vfscanf.c (_IO_vfscanf): Add additional test for EOF
	in loop to look for conversion specifier to avoid testing of
	wrong errno value.
	* stdio-common/Makefile (tests): Add bug18, bug18a, bug19, bug19a.
	* stdio-common/bug18a.c: New file.
	* stdio-common/bug19.c: New file.
	* stdio-common/bug19a.c: New file.
Diffstat (limited to 'libio')
-rw-r--r--libio/strops.c9
-rw-r--r--libio/wstrops.c10
2 files changed, 4 insertions, 15 deletions
diff --git a/libio/strops.c b/libio/strops.c
index c3222e0803..05270ce407 100644
--- a/libio/strops.c
+++ b/libio/strops.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1997-2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997-2003, 2004, 2006 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
@@ -166,12 +166,7 @@ _IO_str_underflow (fp)
   if (fp->_IO_read_ptr < fp->_IO_read_end)
     return *((unsigned char *) fp->_IO_read_ptr);
   else
-    {
-      /* We have to reset errno since callers check for errno being
-	 EINTR and there has been no such problem here.  */
-      __set_errno (0);
-      return EOF;
-    }
+    return EOF;
 }
 INTDEF(_IO_str_underflow)
 
diff --git a/libio/wstrops.c b/libio/wstrops.c
index dfb312f6b7..c5aae7bc6a 100644
--- a/libio/wstrops.c
+++ b/libio/wstrops.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993,1997-1999,2001-2004,2006,2007
-   Free Software Foundation, Inc.
+/* Copyright (C) 1993,1997-1999,2001-2004, 2006 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
@@ -155,12 +154,7 @@ _IO_wstr_underflow (fp)
   if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
     return *fp->_wide_data->_IO_read_ptr;
   else
-    {
-      /* We have to reset errno since callers check for errno being
-	 EINTR and there has been no such problem here.  */
-      __set_errno (0);
-      return WEOF;
-    }
+    return WEOF;
 }