From 0e5891cb6cfa478af9c7d4f4340d39b9caed285c Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 19 Oct 2005 19:10:33 +0000 Subject: once again: library routines should not check pointers and what errno with EFAULT. programmers ignore the error returns. please, please, please -- we want to crash so that the programmer will become aware of the bug and fix it instead. ok otto --- lib/libc/gen/getlogin.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/libc/gen/getlogin.c b/lib/libc/gen/getlogin.c index e6a0c285b43..403f41d995f 100644 --- a/lib/libc/gen/getlogin.c +++ b/lib/libc/gen/getlogin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getlogin.c,v 1.10 2005/08/08 08:05:34 espie Exp $ */ +/* $OpenBSD: getlogin.c,v 1.11 2005/10/19 19:10:32 deraadt Exp $ */ /* * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -64,9 +64,6 @@ getlogin_r(char *name, size_t namelen) { int logname_size; - if (name == NULL) - return EFAULT; - _THREAD_PRIVATE_MUTEX_LOCK(logname); if (!logname_valid) { if (_getlogin(logname, sizeof(logname) - 1) < 0) { -- cgit v1.2.3