From df6c012b99499d95ed7fee53553a9f4d4473ccae Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Wed, 7 Feb 2018 19:41:01 -0500 Subject: Remove _IO_file_flags define. This entirely mechanical (except for some indentation fixups) patch replaces all uses of _IO_file_flags with _flags and removes the #define. Installed stripped libraries and executables are unchanged by this patch. * libio/libio.h (_IO_file_flags): Remove macro. All uses changed to _flags. --- debug/fgets_chk.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'debug/fgets_chk.c') diff --git a/debug/fgets_chk.c b/debug/fgets_chk.c index f223653..f3548c7 100644 --- a/debug/fgets_chk.c +++ b/debug/fgets_chk.c @@ -40,13 +40,12 @@ __fgets_chk (char *buf, size_t size, int n, FILE *fp) /* 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 = fp->_IO_file_flags & _IO_ERR_SEEN; - fp->_IO_file_flags &= ~_IO_ERR_SEEN; + int old_error = fp->_flags & _IO_ERR_SEEN; + fp->_flags &= ~_IO_ERR_SEEN; count = _IO_getline (fp, buf, MIN ((size_t) n - 1, size), '\n', 1); /* If we read in some bytes and errno is EAGAIN, that error will be reported for next read. */ - if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN) - && errno != EAGAIN)) + if (count == 0 || ((fp->_flags & _IO_ERR_SEEN) && errno != EAGAIN)) result = NULL; else if (count >= size) __chk_fail (); @@ -55,7 +54,7 @@ __fgets_chk (char *buf, size_t size, int n, FILE *fp) buf[count] = '\0'; result = buf; } - fp->_IO_file_flags |= old_error; + fp->_flags |= old_error; _IO_release_lock (fp); return result; } -- cgit v1.1