diff options
author | 2005-10-19 18:48:11 +0000 | |
---|---|---|
committer | 2005-10-19 18:48:11 +0000 | |
commit | 0cbef5eaab3b58d1178e3e61825cf570f152544d (patch) | |
tree | af4d1578d0c498983ad5b29ef8ecb3ef6777ec72 /lib/libutil/opendisk.c | |
parent | add missing header for HISTORY section; ok jmc awhile ago (diff) | |
download | wireguard-openbsd-0cbef5eaab3b58d1178e3e61825cf570f152544d.tar.xz wireguard-openbsd-0cbef5eaab3b58d1178e3e61825cf570f152544d.zip |
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) { |