diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-10-19 18:48:12 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-10-19 18:48:12 +0000 |
commit | 46f7ae0fa3b160ba2a546fbd34403543eda70264 (patch) | |
tree | 17d22f7b25cc95f0606a42b83ba6a0585175a165 /lib/libutil/opendisk.c | |
parent | 0ec545f7eac52d78eb53b858d24d57788dd3b23e (diff) |
library routines should not be checking for NULL pointers passed in,
and then setting errno to EFAULT. that is balony programming! they
should keep stumbling along to purposely create a crash, so that the
programmer stops doing that kind of stupid crap. ok otto
Diffstat (limited to 'lib/libutil/opendisk.c')
-rw-r--r-- | lib/libutil/opendisk.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libutil/opendisk.c b/lib/libutil/opendisk.c index 6ca7b297717..f253b432a37 100644 --- a/lib/libutil/opendisk.c +++ b/lib/libutil/opendisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: opendisk.c,v 1.3 2004/05/28 07:03:47 deraadt Exp $ */ +/* $OpenBSD: opendisk.c,v 1.4 2005/10/19 18:48:11 deraadt Exp $ */ /* $NetBSD: opendisk.c,v 1.4 1997/09/30 17:13:50 phil Exp $ */ /*- @@ -53,10 +53,6 @@ opendisk(const char *path, int flags, char *buf, size_t buflen, int iscooked) { int f, rawpart; - if (buf == NULL) { - errno = EFAULT; - return (-1); - } snprintf(buf, buflen, "%s", path); if ((flags & O_CREAT) != 0) { |