author | Rich Felker <dalias@aerifal.cx> | 2018年10月16日 01:08:21 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018年10月17日 23:16:35 -0400 |
commit | dd8f02b7dce53d6b1c4282439f1636a2d63bee01 (patch) | |
tree | 22b57b941720ddefb64108da93268b2ea288567a /src/stdio/fgetc.c | |
parent | 7136836e14e5286afe74a354c289601375bd472d (diff) | |
download | musl-dd8f02b7dce53d6b1c4282439f1636a2d63bee01.tar.gz |
-rw-r--r-- | src/stdio/fgetc.c | 10 |
diff --git a/src/stdio/fgetc.c b/src/stdio/fgetc.c index e1224164..2578afcc 100644 --- a/src/stdio/fgetc.c +++ b/src/stdio/fgetc.c @@ -1,11 +1,7 @@ -#include "stdio_impl.h" +#include <stdio.h> +#include "getc.h" int fgetc(FILE *f) { - int c; - if (f->lock < 0 || !__lockfile(f)) - return getc_unlocked(f); - c = getc_unlocked(f); - __unlockfile(f); - return c; + return do_getc(f); } |