]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - libio/getchar.c
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / libio / getchar.c
index 0e3f4153c89b494556c1cf475f0855244e9165d0..857c5067729c759d138838a5a1cc41184f3c08a2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.
+   <https://www.gnu.org/licenses/>.
 
    As a special exception, if you link the code in this file with
    files compiled with a GNU compiler to produce an executable,
@@ -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;
 }