]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
[BZ #1061]
authorRoland McGrath <roland@gnu.org>
Thu, 8 Sep 2005 08:09:03 +0000 (08:09 +0000)
committerRoland McGrath <roland@gnu.org>
Thu, 8 Sep 2005 08:09:03 +0000 (08:09 +0000)
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.

sysdeps/generic/glob.c

index c0e76b377e5a0e2b8edf30f6982a7d414ef3b64d..2e767304a781da9ee0dbc6a0b8a2c2d70579a3d4 100644 (file)
@@ -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
@@ -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