summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Holst <holstsn@users.sourceforge.net>2003-01-12 16:38:08 +0000
committerStefan Holst <holstsn@users.sourceforge.net>2003-01-12 16:38:08 +0000
commitea14617ad340918b23e9412b57643b0e962e7e77 (patch)
tree5b7bd9c55c09172e157c16b3382588fe64390f14
parent5547c7ced10a5ab4be6fe8f35dbd405b03d92b7b (diff)
downloadxine-lib-ea14617ad340918b23e9412b57643b0e962e7e77.tar.gz
xine-lib-ea14617ad340918b23e9412b57643b0e962e7e77.tar.bz2
i got the case that getpwuid_r returns 0 _and_ NULL in pw
CVS patchset: 3879 CVS date: 2003/01/12 16:38:08
-rw-r--r--src/xine-utils/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c
index 061260782..cf51f5147 100644
--- a/src/xine-utils/utils.c
+++ b/src/xine-utils/utils.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: utils.c,v 1.10 2002/11/22 05:25:17 storri Exp $
+ * $Id: utils.c,v 1.11 2003/01/12 16:38:08 holstsn Exp $
*
*/
#define _POSIX_PTHREAD_SEMANTICS 1 /* for 5-arg getpwuid_r on solaris */
@@ -78,7 +78,7 @@ const char *xine_get_homedir(void) {
return homedir;
#ifdef HAVE_GETPWUID_R
- if(getpwuid_r(getuid(), &pwd, homedir, sizeof(homedir), &pw) != 0 && pw == NULL) {
+ if(getpwuid_r(getuid(), &pwd, homedir, sizeof(homedir), &pw) != 0 || pw == NULL) {
#else
if((pw = getpwuid(getuid())) == NULL) {
#endif