From 661f9f9c5a1e6f8fa74d450ee8273d6d1f30c5b2 Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Mon, 17 Jul 2023 14:58:04 -0400 Subject: Change getlogin() to only check stdin being null --- newlib/libc/unix/getlogin.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'newlib/libc/unix') diff --git a/newlib/libc/unix/getlogin.c b/newlib/libc/unix/getlogin.c index da4f47a95..876ac32cd 100644 --- a/newlib/libc/unix/getlogin.c +++ b/newlib/libc/unix/getlogin.c @@ -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) -- cgit v1.2.3