util/OptionParser: loop in ParseNext() until a new option is found

This commit is contained in:
Max Kellermann
2018-01-16 11:25:18 +01:00
parent 68f660dbcc
commit 5ab086e337
4 changed files with 24 additions and 32 deletions

View File

@@ -313,9 +313,7 @@ ParseCommandLine(int argc, char **argv, struct options *options)
// First pass: handle command line options
OptionParser parser(argc, argv);
while (parser.HasEntries()) {
if (!parser.ParseNext())
continue;
while (parser.ParseNext()) {
if (parser.CheckOption(opt_kill)) {
options->kill = true;
continue;