diff options
| author | lukem <lukem@NetBSD.org> | 1999-09-20 04:38:56 +0000 |
|---|---|---|
| committer | lukem <lukem@NetBSD.org> | 1999-09-20 04:38:56 +0000 |
| commit | d896261208b4610b0c4e86ea95caad3cdc86a4ac (patch) | |
| tree | 9a96db945c9ffba191e3aa4d741cf5d30fbd30f2 /lib/libcompat | |
| parent | f6ae64deff8e64a1acb3e1536bf6b6d06f7bffb9 (diff) | |
back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
Diffstat (limited to 'lib/libcompat')
| -rw-r--r-- | lib/libcompat/4.1/ftime.c | 8 | ||||
| -rw-r--r-- | lib/libcompat/4.1/gtty.c | 12 | ||||
| -rw-r--r-- | lib/libcompat/4.1/stty.c | 12 | ||||
| -rw-r--r-- | lib/libcompat/4.3/insque.c | 6 | ||||
| -rw-r--r-- | lib/libcompat/4.3/lsearch.c | 14 | ||||
| -rw-r--r-- | lib/libcompat/4.3/regex.c | 10 | ||||
| -rw-r--r-- | lib/libcompat/4.3/remque.c | 6 | ||||
| -rw-r--r-- | lib/libcompat/4.3/rexec.c | 8 | ||||
| -rw-r--r-- | lib/libcompat/4.3/ruserpass.c | 8 | ||||
| -rw-r--r-- | lib/libcompat/regexp/regerror.c | 6 |
10 files changed, 12 insertions, 78 deletions
diff --git a/lib/libcompat/4.1/ftime.c b/lib/libcompat/4.1/ftime.c index ac065db8d12..d88c3f076f9 100644 --- a/lib/libcompat/4.1/ftime.c +++ b/lib/libcompat/4.1/ftime.c @@ -30,7 +30,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: ftime.c,v 1.7 1999/09/16 11:45:46 lukem Exp $"); +__RCSID("$NetBSD: ftime.c,v 1.8 1999/09/20 04:48:01 lukem Exp $"); #endif /* not lint */ #include <sys/types.h> @@ -48,12 +48,6 @@ ftime(tbp) struct timeval t; _DIAGASSERT(tbp != 0); -#ifdef _DIAGNOSTIC - if (tbp == 0) { - errno = EFAULT; - return (-1); - } -#endif if (gettimeofday(&t, &tz) < 0) return (-1); diff --git a/lib/libcompat/4.1/gtty.c b/lib/libcompat/4.1/gtty.c index 5c10be12a93..c15ed85b471 100644 --- a/lib/libcompat/4.1/gtty.c +++ b/lib/libcompat/4.1/gtty.c @@ -30,7 +30,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: gtty.c,v 1.3 1999/09/16 11:45:46 lukem Exp $"); +__RCSID("$NetBSD: gtty.c,v 1.4 1999/09/20 04:48:01 lukem Exp $"); #endif /* not lint */ #include <assert.h> @@ -50,16 +50,6 @@ gtty(fd, tty) _DIAGASSERT(fd != -1); _DIAGASSERT(tty != 0); -#ifdef _DIAGNOSTIC - if (fd == -1) { - errno = EBADF; - return (-1); - } - if (tty == 0) { - errno = EINVAL; - return (-1); - } -#endif return (ioctl(fd, TIOCGETP, tty)); } diff --git a/lib/libcompat/4.1/stty.c b/lib/libcompat/4.1/stty.c index e6537e798b5..0dc8e2e30da 100644 --- a/lib/libcompat/4.1/stty.c +++ b/lib/libcompat/4.1/stty.c @@ -30,7 +30,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: stty.c,v 1.3 1999/09/16 11:45:46 lukem Exp $"); +__RCSID("$NetBSD: stty.c,v 1.4 1999/09/20 04:48:01 lukem Exp $"); #endif /* not lint */ #include <assert.h> @@ -50,16 +50,6 @@ stty(fd, tty) _DIAGASSERT(fd != -1); _DIAGASSERT(tty != 0); -#ifdef _DIAGNOSTIC - if (fd == -1) { - errno = EBADF; - return (-1); - } - if (tty == 0) { - errno = EINVAL; - return (-1); - } -#endif return (ioctl(fd, TIOCSETP, tty)); } diff --git a/lib/libcompat/4.3/insque.c b/lib/libcompat/4.3/insque.c index b53819151f1..26cb7dcb7df 100644 --- a/lib/libcompat/4.3/insque.c +++ b/lib/libcompat/4.3/insque.c @@ -28,7 +28,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: insque.c,v 1.7 1999/09/16 11:45:47 lukem Exp $"); +__RCSID("$NetBSD: insque.c,v 1.8 1999/09/20 04:48:03 lukem Exp $"); #endif /* LIBC_SCCS and not lint */ #include <assert.h> @@ -49,10 +49,6 @@ insque(entry, pred) _DIAGASSERT(e != 0); _DIAGASSERT(p != 0); -#ifdef _DIAGNOSTIC - if (e == 0 || p == 0) - return; -#endif e->q_forw = p->q_forw; e->q_back = p; diff --git a/lib/libcompat/4.3/lsearch.c b/lib/libcompat/4.3/lsearch.c index 8f3b3a9a0f4..0ee9121a60f 100644 --- a/lib/libcompat/4.3/lsearch.c +++ b/lib/libcompat/4.3/lsearch.c @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)lsearch.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: lsearch.c,v 1.6 1999/09/16 11:45:47 lukem Exp $"); +__RCSID("$NetBSD: lsearch.c,v 1.7 1999/09/20 04:48:03 lukem Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -64,12 +64,6 @@ lsearch(key, base, nelp, width, compar) _DIAGASSERT(key != NULL); _DIAGASSERT(base != NULL); _DIAGASSERT(compar != NULL); -#ifdef _DIAGNOSTIC - if (key == NULL || base == NULL || compar == NULL) { - errno = EFAULT; - return (NULL); - } -#endif return(linear_base(key, base, nelp, width, compar, 1)); } @@ -84,12 +78,6 @@ lfind(key, base, nelp, width, compar) _DIAGASSERT(key != NULL); _DIAGASSERT(base != NULL); _DIAGASSERT(compar != NULL); -#ifdef _DIAGNOSTIC - if (key == NULL || base == NULL || compar == NULL) { - errno = EFAULT; - return (NULL); - } -#endif return(linear_base(key, base, nelp, width, compar, 0)); } diff --git a/lib/libcompat/4.3/regex.c b/lib/libcompat/4.3/regex.c index 8b807339d8d..a7cdb8a7241 100644 --- a/lib/libcompat/4.3/regex.c +++ b/lib/libcompat/4.3/regex.c @@ -46,7 +46,7 @@ #if 0 static char sccsid[] = "from: @(#)regex.c 5.1 (Berkeley) 3/29/92";*/ #else -__RCSID("$NetBSD: regex.c,v 1.10 1999/09/16 11:45:47 lukem Exp $"); +__RCSID("$NetBSD: regex.c,v 1.11 1999/09/20 04:48:03 lukem Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -87,10 +87,6 @@ re_exec(s) { int rc; -#ifdef _DIAGNOSTIC - if (s == NULL || *s == '\0') - return (-1); -#endif re_goterr = 0; rc = regexec(re_regexp, s); @@ -103,10 +99,6 @@ regerror(s) { _DIAGASSERT(s != NULL); -#ifdef _DIAGNOSTIC - if (s == NULL) - s = "ERROR: regerror() called with NULL pointer"; -#endif re_goterr = 1; if (re_errstr) diff --git a/lib/libcompat/4.3/remque.c b/lib/libcompat/4.3/remque.c index 9178149b368..31cac5d3669 100644 --- a/lib/libcompat/4.3/remque.c +++ b/lib/libcompat/4.3/remque.c @@ -28,7 +28,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: remque.c,v 1.7 1999/09/16 11:45:47 lukem Exp $"); +__RCSID("$NetBSD: remque.c,v 1.8 1999/09/20 04:48:04 lukem Exp $"); #endif /* LIBC_SCCS and not lint */ #include <assert.h> @@ -46,10 +46,6 @@ remque(element) struct qelem *e = (struct qelem *) element; _DIAGASSERT(e != 0); -#ifdef _DIAGNOSTIC - if (e == 0) - return; -#endif e->q_forw->q_back = e->q_back; e->q_back->q_forw = e->q_forw; diff --git a/lib/libcompat/4.3/rexec.c b/lib/libcompat/4.3/rexec.c index 7631493d17e..f3e9897bab4 100644 --- a/lib/libcompat/4.3/rexec.c +++ b/lib/libcompat/4.3/rexec.c @@ -1,4 +1,4 @@ -/* $NetBSD: rexec.c,v 1.12 1999/09/16 11:45:47 lukem Exp $ */ +/* $NetBSD: rexec.c,v 1.13 1999/09/20 04:48:04 lukem Exp $ */ /* * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)rexec.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: rexec.c,v 1.12 1999/09/16 11:45:47 lukem Exp $"); +__RCSID("$NetBSD: rexec.c,v 1.13 1999/09/20 04:48:04 lukem Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -81,10 +81,6 @@ rexec(ahost, rport, name, pass, cmd, fd2p) _DIAGASSERT(pass != NULL); _DIAGASSERT(cmd != NULL); /* fd2p may be NULL */ -#ifdef _DIAGNOSTIC - if (ahost == NULL || name == NULL || pass == NULL || cmd == NULL) - return (-1); -#endif hp = gethostbyname(*ahost); if (hp == 0) { diff --git a/lib/libcompat/4.3/ruserpass.c b/lib/libcompat/4.3/ruserpass.c index 937fad7a347..b410b3d7971 100644 --- a/lib/libcompat/4.3/ruserpass.c +++ b/lib/libcompat/4.3/ruserpass.c @@ -1,4 +1,4 @@ -/* $NetBSD: ruserpass.c,v 1.6 1999/09/16 11:45:47 lukem Exp $ */ +/* $NetBSD: ruserpass.c,v 1.7 1999/09/20 04:48:04 lukem Exp $ */ /* * Copyright (c) 1985, 1993, 1994 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)ruserpass.c 8.4 (Berkeley) 4/27/95"; #else -__RCSID("$NetBSD: ruserpass.c,v 1.6 1999/09/16 11:45:47 lukem Exp $"); +__RCSID("$NetBSD: ruserpass.c,v 1.7 1999/09/20 04:48:04 lukem Exp $"); #endif #endif /* not lint */ @@ -106,10 +106,6 @@ ruserpass(host, aname, apass) _DIAGASSERT(host != NULL); _DIAGASSERT(aname != NULL); _DIAGASSERT(apass != NULL); -#ifdef _DIAGNOSTIC - if (host == NULL || aname == NULL || apass == NULL) - return (-1); -#endif hdir = getenv("HOME"); if (hdir == NULL) diff --git a/lib/libcompat/regexp/regerror.c b/lib/libcompat/regexp/regerror.c index 2f0ce766d4b..756c54f5697 100644 --- a/lib/libcompat/regexp/regerror.c +++ b/lib/libcompat/regexp/regerror.c @@ -1,6 +1,6 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: regerror.c,v 1.7 1999/09/16 11:45:48 lukem Exp $"); +__RCSID("$NetBSD: regerror.c,v 1.8 1999/09/20 04:48:04 lukem Exp $"); #endif /* not lint */ #include <assert.h> @@ -14,10 +14,6 @@ const char *s; { _DIAGASSERT(s != NULL); -#ifdef _DIAGNOSTIC - if (s == NULL) - s = "ERROR: __compat_regerror() called with s == NULL"; -#endif #ifdef ERRAVAIL error("regexp: %s", s); |
