Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/ungetc.c')
-rw-r--r--newlib/libc/stdio/ungetc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/newlib/libc/stdio/ungetc.c b/newlib/libc/stdio/ungetc.c
index 9ccd02766..fc6fa3160 100644
--- a/newlib/libc/stdio/ungetc.c
+++ b/newlib/libc/stdio/ungetc.c
@@ -77,14 +77,14 @@ _DEFUN(_ungetc_r, (rptr, c, fp),
if (c == EOF)
return (EOF);
- _flockfile (fp);
-
/* Ensure stdio has been initialized.
??? Might be able to remove this as some other stdio routine should
have already been called to get the char we are un-getting. */
- CHECK_INIT (fp);
+ CHECK_INIT (rptr);
+ _flockfile (fp);
+
/* After ungetc, we won't be at eof anymore */
fp->_flags &= ~__SEOF;