aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/getc.c
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2023-11-20 20:49:53 +0100
committerCorinna Vinschen <corinna@vinschen.de>2023-11-20 20:59:47 +0100
commit61e52c4d60c57f520cd19de310260395add5ce97 (patch)
treef143f59be8994f4911c1810d88b483936ecbe3d3 /newlib/libc/stdio/getc.c
parentc190063f9658153988d735a333a7a3c7aeadc001 (diff)
downloadnewlib-61e52c4d60c57f520cd19de310260395add5ce97.zip
newlib-61e52c4d60c57f520cd19de310260395add5ce97.tar.gz
newlib-61e52c4d60c57f520cd19de310260395add5ce97.tar.bz2
stdio: drop unnecessary calls to ORIENT
Now that the low-level functions set and test stream orientation, a few calls in API functions are redundant. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc/stdio/getc.c')
-rw-r--r--newlib/libc/stdio/getc.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/newlib/libc/stdio/getc.c b/newlib/libc/stdio/getc.c
index 12bffaf..c878132 100644
--- a/newlib/libc/stdio/getc.c
+++ b/newlib/libc/stdio/getc.c
@@ -81,9 +81,6 @@ _getc_r (struct _reent *ptr,
{
int result;
CHECK_INIT (ptr, fp);
- if (ORIENT (fp, -1) != -1)
- return EOF;
-
_newlib_flockfile_start (fp);
result = __sgetc_r (ptr, fp);
_newlib_flockfile_end (fp);
@@ -99,9 +96,6 @@ getc (register FILE *fp)
struct _reent *reent = _REENT;
CHECK_INIT (reent, fp);
- if (ORIENT (fp, -1) != -1)
- return EOF;
-
_newlib_flockfile_start (fp);
result = __sgetc_r (reent, fp);
_newlib_flockfile_end (fp);