From: Ulrich Drepper Date: Fri, 14 Dec 2001 07:02:32 +0000 (+0000) Subject: (cuserid): If we don't find the UID, but have a user supplied buffer, return X-Git-Tag: cvs/glibc-2-2-5~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=261e312c011fa29383a948322592e2abb3f85cee;p=thirdparty%2Fglibc.git (cuserid): If we don't find the UID, but have a user supplied buffer, return the empty buffer, not NULL. --- diff --git a/sysdeps/posix/cuserid.c b/sysdeps/posix/cuserid.c index 3417d0a6958..11c827a6868 100644 --- a/sysdeps/posix/cuserid.c +++ b/sysdeps/posix/cuserid.c @@ -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)