public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jeff Johnston <jjohnstn@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Change getlogin() to only check stdin being null
Date: Mon, 17 Jul 2023 19:05:56 +0000 (GMT)	[thread overview]
Message-ID: <20230717190556.087CA3858D28@sourceware.org> (raw)

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)

                 reply	other threads:[~2023-07-17 19:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230717190556.087CA3858D28@sourceware.org \
    --to=jjohnstn@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).