aboutsummaryrefslogtreecommitdiff
path: root/libio/getchar.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/getchar.c')
-rw-r--r--libio/getchar.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libio/getchar.c b/libio/getchar.c
index 7e385305ff..90dea38ddb 100644
--- a/libio/getchar.c
+++ b/libio/getchar.c
@@ -33,11 +33,11 @@ int
getchar (void)
{
int result;
- if (!_IO_need_lock (_IO_stdin))
- return _IO_getc_unlocked (_IO_stdin);
- _IO_acquire_lock (_IO_stdin);
- result = _IO_getc_unlocked (_IO_stdin);
- _IO_release_lock (_IO_stdin);
+ if (!_IO_need_lock (stdin))
+ return _IO_getc_unlocked (stdin);
+ _IO_acquire_lock (stdin);
+ result = _IO_getc_unlocked (stdin);
+ _IO_release_lock (stdin);
return result;
}