From 8aa3727a11a2870dbcc1914a494f8e74e1d2293a Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 29 Sep 1998 02:22:15 +0000 Subject: only spew 'illegal option' once if they give an unsupported optino --- usr.sbin/arp/arp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.sbin/arp/arp.c') diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 70d9306151d..1f8afd70745 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arp.c,v 1.12 1998/05/14 21:16:42 deraadt Exp $ */ +/* $OpenBSD: arp.c,v 1.13 1998/09/29 02:22:14 millert Exp $ */ /* $NetBSD: arp.c,v 1.12 1995/04/24 13:25:18 cgd Exp $ */ /* @@ -98,12 +98,14 @@ main(argc, argv) int ch; pid = getpid(); + opterr = 0; while ((ch = getopt(argc, argv, "andsf")) != -1) if (ch == 'n') nflag = 1; optind = 1; optreset = 1; + opterr = 1; while ((ch = getopt(argc, argv, "andsf")) != -1) switch((char)ch) { case 'a': -- cgit v1.2.3