about summary refs log tree commit diff
path: root/stdio-common/vfscanf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-02-17 15:51:21 +0000
committerUlrich Drepper <drepper@redhat.com>1998-02-17 15:51:21 +0000
commitb112c02fa26967dc8d5aa26dcbe3701821eee6f1 (patch)
treeff281bcb35e4455570555dfab76ecaa82ad3063a /stdio-common/vfscanf.c
parent0a61487785ff1f13ce3bb683cd59e520bbb0086f (diff)
downloadglibc-b112c02fa26967dc8d5aa26dcbe3701821eee6f1.tar.gz
glibc-b112c02fa26967dc8d5aa26dcbe3701821eee6f1.tar.xz
glibc-b112c02fa26967dc8d5aa26dcbe3701821eee6f1.zip
Update.
1998-02-17  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* math/libm.map: Move all symbols that are new in glibc 2.1 to
	version GLIBC_2.1.

1998-02-17  Ulrich Drepper  <drepper@cygnus.com>

	* stdio-common/vfscanf.c (inchar): Check c for being EOF before
	trying to read another character.

1998-02-05  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* nis/nss_nis/nis-alias.c (_nss_nis_getaliasbyname_r): Convert
	name to lowercase.

	* nis/nss_nis/nis-network.c (_nss_nis_getnetbyname_r): Convert
	name to lowercase, add test for big enough buffer.

1998-02-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S (rt_sigreturn):
	Make compatible with older kernels. Patch by Richard Henderson.
Diffstat (limited to 'stdio-common/vfscanf.c')
-rw-r--r--stdio-common/vfscanf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 0399e39ef5..bad37f2ad1 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -57,8 +57,9 @@
 # define va_list	_IO_va_list
 # define ungetc(c, s)	((void) ((int) c != EOF && --read_in),		      \
 			 _IO_ungetc (c, s))
-# define inchar()	((c = _IO_getc_unlocked (s)), \
-			 (void) (c != EOF && ++read_in), c)
+# define inchar()	(c == EOF ? EOF					      \
+			 : ((c = _IO_getc_unlocked (s)),		      \
+			    (void) (c != EOF && ++read_in), c))
 # define encode_error()	do {						      \
 			  if (errp != NULL) *errp |= 4;			      \
 			  _IO_funlockfile (s);				      \
@@ -102,7 +103,8 @@
 # define UNLOCK_STREAM __libc_cleanup_region_end (1)
 #else
 # define ungetc(c, s)	((void) (c != EOF && --read_in), ungetc (c, s))
-# define inchar()	((c = getc (s)), (void) (c != EOF && ++read_in), c)
+# define inchar()	(c == EOF ? EOF					      \
+			 : (c = getc (s)), (void) (c != EOF && ++read_in), c)
 # define encode_error()	do {						      \
 			  funlockfile (s);				      \
 			  __set_errno (EILSEQ);				      \