public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Change getlogin() to only check stdin being null
@ 2023-07-17 19:05 Jeff Johnston
  0 siblings, 0 replies; only message in thread
From: Jeff Johnston @ 2023-07-17 19:05 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=661f9f9c5a1e6f8fa74d450ee8273d6d1f30c5b2

commit 661f9f9c5a1e6f8fa74d450ee8273d6d1f30c5b2
Author: Jordi Sanfeliu <jordi@fibranet.cat>
Date:   Mon Jul 17 14:58:04 2023 -0400

    Change getlogin() to only check stdin being null

Diff:
---
 newlib/libc/unix/getlogin.c | 2 --
 1 file changed, 2 deletions(-)

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-17 19:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 19:05 [newlib-cygwin] Change getlogin() to only check stdin being null Jeff Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).