repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix unsynchronized access to FILE structure in fflush(0)
[musl.git]
/
src
/
stdio
/
getc.c
blob
b3f351d1d7e45e5f4ef9ad91c868981e6aaf1929
1
#include
"stdio_impl.h"
2
3
int
getc
(
FILE
*
f
)
4
{
5
int
c
;
6
if
(
f
->
lock
<
0
|| !
__lockfile
(
f
))
7
return
getc_unlocked
(
f
);
8
c
=
getc_unlocked
(
f
);
9
__unlockfile
(
f
);
10
return
c
;
11
}
12
13
weak_alias
(
getc
,
_IO_getc
);