summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-10-19 19:10:33 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-10-19 19:10:33 +0000
commit0e5891cb6cfa478af9c7d4f4340d39b9caed285c (patch)
tree7166c5d484f89c319819daa8e28cc465e8a26939
parent46f7ae0fa3b160ba2a546fbd34403543eda70264 (diff)
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
-rw-r--r--lib/libc/gen/getlogin.c5
1 files changed, 1 insertions, 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) {