summaryrefslogtreecommitdiff
path: root/usr.bin/env/env.c
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2006-05-28 05:29:55 +0000
committerRay Lai <ray@cvs.openbsd.org>2006-05-28 05:29:55 +0000
commit68fe893a9f1ead265b6739f54a47fbdc839ee159 (patch)
tree87f6c0d0056eac91959a9448fab96987eb13b884 /usr.bin/env/env.c
parentbd64b800ae4fc10c918bcd7b9ef1a09d407a0301 (diff)
Re-add '-' getopt flag, since getopt can actually handle it.
Requested by deraadt@.
Diffstat (limited to 'usr.bin/env/env.c')
-rw-r--r--usr.bin/env/env.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/env/env.c b/usr.bin/env/env.c
index db5d70f7f6c..8240bf28928 100644
--- a/usr.bin/env/env.c
+++ b/usr.bin/env/env.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: env.c,v 1.11 2006/05/28 04:21:13 ray Exp $ */
+/* $OpenBSD: env.c,v 1.12 2006/05/28 05:29:54 ray Exp $ */
/*
* Copyright (c) 1988, 1993, 1994
@@ -37,7 +37,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)env.c 8.3 (Berkeley) 4/2/94";*/
-static char rcsid[] = "$OpenBSD: env.c,v 1.11 2006/05/28 04:21:13 ray Exp $";
+static char rcsid[] = "$OpenBSD: env.c,v 1.12 2006/05/28 05:29:54 ray Exp $";
#endif /* not lint */
#include <err.h>
@@ -60,8 +60,9 @@ main(int argc, char *argv[])
setlocale(LC_ALL, "");
- while ((ch = getopt(argc, argv, "i")) != -1)
+ while ((ch = getopt(argc, argv, "i-")) != -1)
switch(ch) {
+ case '-': /* obsolete */
case 'i':
if ((environ = calloc(1, sizeof(char *))) == NULL)
err(126, "calloc");