diff options
author | tjr <tjr@FreeBSD.org> | 2002-07-25 10:47:38 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-07-25 10:47:38 +0000 |
commit | ca8e9f2edf22b507593fe9c0b5a2b8f9fad7d37e (patch) | |
tree | 5018303a2ea7f396a38480e2e723c454ffc130c1 /bin/sh/histedit.c | |
parent | 3be089e932919830a7affb5dff5e8751a597e10b (diff) | |
download | FreeBSD-src-ca8e9f2edf22b507593fe9c0b5a2b8f9fad7d37e.zip FreeBSD-src-ca8e9f2edf22b507593fe9c0b5a2b8f9fad7d37e.tar.gz |
Set opterr to zero to avoid duplicate warnings from getopt(3) for unknown
options.
Diffstat (limited to 'bin/sh/histedit.c')
-rw-r--r-- | bin/sh/histedit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index 6cd9fe4..d081d05 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -208,6 +208,7 @@ histcmd(int argc, char **argv) error("missing history argument"); optreset = 1; optind = 1; /* initialize getopt */ + opterr = 0; while (not_fcnumber(argv[optind]) && (ch = getopt(argc, argv, ":e:lnrs")) != -1) switch ((char)ch) { |