mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 23:50:27 +00:00
Set stream orientation in ungetc() instead of __ungetc(). This avoids
setting it redundantly when called from ungetwc(), vfscanf() etc., which already set the orientation.
This commit is contained in:
parent
4124f7c013
commit
85fa6736d8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=126809
|
@ -99,6 +99,7 @@ ungetc(int c, FILE *fp)
|
|||
if (!__sdidinit)
|
||||
__sinit();
|
||||
FLOCKFILE(fp);
|
||||
ORIENT(fp, -1);
|
||||
ret = __ungetc(c, fp);
|
||||
FUNLOCKFILE(fp);
|
||||
return (ret);
|
||||
|
@ -111,8 +112,6 @@ int
|
|||
__ungetc(int c, FILE *fp)
|
||||
{
|
||||
|
||||
ORIENT(fp, -1);
|
||||
|
||||
if (c == EOF)
|
||||
return (EOF);
|
||||
if ((fp->_flags & __SRD) == 0) {
|
||||
|
|
Loading…
Reference in a new issue