projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d7e32d
)
remove another invalid skip of locking in ungetwc
author
Rich Felker
<dalias@aerifal.cx>
Sat, 6 Jun 2015 18:20:30 +0000
(18:20 +0000)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 6 Jun 2015 18:20:30 +0000
(18:20 +0000)
src/stdio/ungetwc.c
patch
|
blob
|
history
diff --git
a/src/stdio/ungetwc.c
b/src/stdio/ungetwc.c
index 0a4cd7a1f2f01d94b35ec04b7353aa360b7429bf..394f92ac9cba89474f74c00137a13cd53210e4b8 100644
(file)
--- a/
src/stdio/ungetwc.c
+++ b/
src/stdio/ungetwc.c
@@
-9,14
+9,12
@@
wint_t ungetwc(wint_t c, FILE *f)
unsigned char mbc[MB_LEN_MAX];
int l=1;
- if (c == WEOF) return c;
-
FLOCK(f);
f->mode |= f->mode+1;
if (!f->rpos) __toread(f);
- if (!f->rpos || f->rpos < f->buf - UNGET + l ||
+ if (!f->rpos || f->rpos < f->buf - UNGET + l ||
c == WEOF ||
(!isascii(c) && (l = wctomb((void *)mbc, c)) < 0)) {
FUNLOCK(f);
return WEOF;