diff options
author | nelsonb%netscape.com <devnull@localhost> | 2000-10-09 23:39:46 +0000 |
---|---|---|
committer | nelsonb%netscape.com <devnull@localhost> | 2000-10-09 23:39:46 +0000 |
commit | e5b70fe22a6fcd466fba2969640a2a813a0f68dd (patch) | |
tree | 483fadc2498df5466ccc355956df656e0aaa23ec | |
parent | 0a8a8ab6fe59491c49484bccaff6ba2d610e310b (diff) | |
download | nss-hg-e5b70fe22a6fcd466fba2969640a2a813a0f68dd.tar.gz |
When an invalid option is encountered, print the usage message and exit.
Previously, it would simply silently stop parsing options and the program
would continue to run, leading to false successes in coverage tests.
-rw-r--r-- | security/nss/cmd/tstclnt/tstclnt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/security/nss/cmd/tstclnt/tstclnt.c b/security/nss/cmd/tstclnt/tstclnt.c index badb813df..87bee2fd7 100644 --- a/security/nss/cmd/tstclnt/tstclnt.c +++ b/security/nss/cmd/tstclnt/tstclnt.c @@ -325,6 +325,8 @@ int main(int argc, char **argv) case 'x': useExportPolicy = 1; break; } } + if (optstatus == PL_OPT_BAD) + Usage(progName); if (!host || !port) Usage(progName); |