summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/getopt_long.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib/getopt_long.c')
-rw-r--r--lib/libc/stdlib/getopt_long.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/libc/stdlib/getopt_long.c b/lib/libc/stdlib/getopt_long.c
index 9a5e70ec152..adf62c11755 100644
--- a/lib/libc/stdlib/getopt_long.c
+++ b/lib/libc/stdlib/getopt_long.c
@@ -84,13 +84,6 @@ getopt_internal(nargc, nargv, ostr)
_DIAGASSERT(nargv != NULL);
_DIAGASSERT(ostr != NULL);
-#ifdef _DIAGNOSTIC
- if (nargv == NULL || ostr == NULL) {
- errno = EFAULT;
- place = EMSG;
- return (-1);
- }
-#endif
if (optreset || !*place) { /* update scanning pointer */
optreset = 0;
@@ -180,12 +173,6 @@ getopt_long(nargc, nargv, options, long_options, index)
_DIAGASSERT(ostr != NULL);
_DIAGASSERT(long_options != NULL);
/* index may be NULL */
-#ifdef _DIAGNOSTIC
- if (nargv == NULL || ostr == NULL || long_options) {
- errno = EFAULT;
- return (-1);
- }
-#endif
if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
char *current_argv = nargv[optind++] + 2, *has_equal;