Fix -vVg loops

v0.27.3
Robin Mills 7 years ago committed by Luis Díaz Más
parent 4af64f4eec
commit 8a6cd5d24e

@ -1018,7 +1018,6 @@ int Params::getopt(int argc, char* const Argv[])
int rc = Util::Getopt::getopt(argc, argv, optstring_); int rc = Util::Getopt::getopt(argc, argv, optstring_);
// Further consistency checks // Further consistency checks
if (help_ || version_) { if (help_ || version_) {
rc = 0;
goto cleanup; goto cleanup;
} }
if (action_ == Action::none) { if (action_ == Action::none) {

@ -103,7 +103,7 @@ namespace Util {
progname_ = Util::basename(argv[0]); progname_ = Util::basename(argv[0]);
Util::optind = 0; // reset the Util::Getopt scanner Util::optind = 0; // reset the Util::Getopt scanner
for (;;) { for (;!errcnt_;) {
int c = Util::getopt(argc, argv, optstring.c_str()); int c = Util::getopt(argc, argv, optstring.c_str());
if (c == -1) { if (c == -1) {
break; break;

Loading…
Cancel
Save