summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-28 22:29:36 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-28 22:29:36 +0000
commit12e3e5cc742f090e655616532db5fd8bed8db838 (patch)
tree52b24cd406292567422a625afe3782f84790a80b
parent1e0448d42aae916fdce81eda7eb01feeecc4eb67 (diff)
downloadglibc-12e3e5cc742f090e655616532db5fd8bed8db838.tar.gz
(ungetc): Cast c to signed char first to really match EOF.
-rw-r--r--stdio-common/vfscanf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 1d9fd3e174..93e015f3df 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -102,7 +102,7 @@
# undef EOF
# define EOF WEOF
# else
-# define ungetc(c, s) ((void) ((int) c == EOF \
+# define ungetc(c, s) ((void) ((int) (signed char) c == EOF \
|| (--read_in, \
_IO_sputbackc (s, (unsigned char) c))))
# define inchar() (c == EOF ? EOF \