about summary refs log tree commit diff
path: root/src/stdio/fgetc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/fgetc.c')
-rw-r--r--src/stdio/fgetc.c10
1 files changed, 3 insertions, 7 deletions
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);
 }