]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(cuserid): If we don't find the UID, but have a user supplied buffer, return
authorUlrich Drepper <drepper@redhat.com>
Fri, 14 Dec 2001 07:02:32 +0000 (07:02 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 14 Dec 2001 07:02:32 +0000 (07:02 +0000)
the empty buffer, not NULL.

sysdeps/posix/cuserid.c

index 3417d0a695847a452874c98ae139811e97a3a129..11c827a6868743088855f200684965c6d286c85c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996, 1998, 1999, 2001 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
@@ -39,7 +39,7 @@ cuserid (s)
     {
       if (s != NULL)
        s[0] = '\0';
-      return NULL;
+      return s;
     }
 
   if (s == NULL)