projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
in crypt_des change unnecessary union keybuf into unsigned char[]
[musl]
/
src
/
stdio
/
fgetc.c
diff --git
a/src/stdio/fgetc.c
b/src/stdio/fgetc.c
index
3a7f1e3
..
e122416
100644
(file)
--- a/
src/stdio/fgetc.c
+++ b/
src/stdio/fgetc.c
@@
-3,8
+3,9
@@
int fgetc(FILE *f)
{
int c;
- FLOCK(f);
- c = f->rpos < f->rstop ? *f->rpos++ : __uflow(f);
- FUNLOCK(f);
+ if (f->lock < 0 || !__lockfile(f))
+ return getc_unlocked(f);
+ c = getc_unlocked(f);
+ __unlockfile(f);
return c;
}