Skip to content

Commit

Permalink
[BZ #1061]
Browse files Browse the repository at this point in the history
2005-07-11  Derek R. Price  <derek@ximbiot.com>
	[BZ #1061]
	* sysdeps/generic/glob.c (glob): Only a 0 return from
	getlogin_r means success, according to POSIX 1003.2.
  • Loading branch information
Roland McGrath committed Sep 8, 2005
1 parent 3aeb7ee commit ca85722
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sysdeps/generic/glob.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1991-2002, 2003, 2004 Free Software Foundation, Inc.
/* Copyright (C) 1991-2002,2003,2004,2005 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
Expand Down Expand Up @@ -715,7 +715,7 @@ glob (pattern, flags, errfunc, pglob)
buflen = 20;
name = (char *) __alloca (buflen);

success = getlogin_r (name, buflen) >= 0;
success = getlogin_r (name, buflen) == 0;
# else
success = (name = getlogin ()) != NULL;
# endif
Expand Down

0 comments on commit ca85722

Please sign in to comment.