summaryrefslogtreecommitdiff
path: root/debug/gets_chk.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 16:29:38 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 16:29:38 +0000
commit7c7d34a16f08f84427b3f617313d9633423ad5eb (patch)
tree2c1ac6a7e6b47a49228b905f12b3604dfa4d1dc3 /debug/gets_chk.c
parent6772d640a4f4874166a61f1859e1660a2913a89d (diff)
parent963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff)
Merge commit 'refs/top-bases/t/hurdsig-fixes' into t/hurdsig-fixes
Diffstat (limited to 'debug/gets_chk.c')
-rw-r--r--debug/gets_chk.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/debug/gets_chk.c b/debug/gets_chk.c
index aebc9eb705..2b1416b295 100644
--- a/debug/gets_chk.c
+++ b/debug/gets_chk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
@@ -30,7 +30,7 @@
char *
__gets_chk (char *buf, size_t size)
{
- _IO_size_t count;
+ size_t count;
int ch;
char *retval;
@@ -51,17 +51,17 @@ __gets_chk (char *buf, size_t size)
/* This is very tricky since a file descriptor may be in the
non-blocking mode. The error flag doesn't mean much in this
case. We return an error only when there is a new error. */
- int old_error = _IO_stdin->_IO_file_flags & _IO_ERR_SEEN;
- _IO_stdin->_IO_file_flags &= ~_IO_ERR_SEEN;
+ int old_error = _IO_stdin->_flags & _IO_ERR_SEEN;
+ _IO_stdin->_flags &= ~_IO_ERR_SEEN;
buf[0] = (char) ch;
count = _IO_getline (_IO_stdin, buf + 1, size - 1, '\n', 0) + 1;
- if (_IO_stdin->_IO_file_flags & _IO_ERR_SEEN)
+ if (_IO_stdin->_flags & _IO_ERR_SEEN)
{
retval = NULL;
goto unlock_return;
}
else
- _IO_stdin->_IO_file_flags |= old_error;
+ _IO_stdin->_flags |= old_error;
}
if (count >= size)
__chk_fail ();