aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/getlogin.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/getlogin.c')
-rw-r--r--sysdeps/unix/getlogin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/getlogin.c b/sysdeps/unix/getlogin.c
index 6e8a9a2a87..84b7dd8276 100644
--- a/sysdeps/unix/getlogin.c
+++ b/sysdeps/unix/getlogin.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1997 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
@@ -46,7 +46,7 @@ getlogin (void)
thing to do. Note that ttyname(open("/dev/tty")) on those
systems returns /dev/tty, so that is not a possible solution for
getlogin(). */
- if (__ttyname_r (0, real_tty_path, sizeof (tty_pathname)) < 0)
+ if (__ttyname_r (0, real_tty_path, sizeof (tty_pathname)) != 0)
return NULL;
real_tty_path += 5; /* Remove "/dev/". */