4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-18 15:09:32 +08:00

Change getlogin() to only check stdin being null

This commit is contained in:
Jordi Sanfeliu 2023-07-17 14:58:04 -04:00 committed by Jeff Johnston
parent fee0c04e30
commit 661f9f9c5a

View File

@ -17,8 +17,6 @@ getlogin ()
char *tty;
if (((tty = ttyname (0)) == 0)
|| ((tty = ttyname (1)) == 0)
|| ((tty = ttyname (2)) == 0))
return 0;
if ((utmp_fd = open (UTMP_FILE, O_RDONLY)) == -1)