From: Phil Sutter Date: Sat, 2 Dec 2023 10:10:33 +0000 (+0100) Subject: main: Reduce indenting in nft_options_check() X-Git-Tag: v1.1.0~190 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bda378c2d9d561bdda9ce33aedc91bc11b402ac7;p=thirdparty%2Fnftables.git main: Reduce indenting in nft_options_check() No functional change intended. Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- diff --git a/src/main.c b/src/main.c index 9485b193..c3c7fe23 100644 --- a/src/main.c +++ b/src/main.c @@ -333,23 +333,24 @@ static bool nft_options_check(int argc, char * const argv[]) } else if (skip) { skip = false; continue; - } else if (argv[i][0] == '-') { - if (nonoption) { - nft_options_error(argc, argv, pos); - return false; - } else if (argv[i][1] == 'd' || - argv[i][1] == 'I' || - argv[i][1] == 'f' || - argv[i][1] == 'D' || - !strcmp(argv[i], "--debug") || - !strcmp(argv[i], "--includepath") || - !strcmp(argv[i], "--define") || - !strcmp(argv[i], "--file")) { - skip = true; - continue; - } } else if (argv[i][0] != '-') { nonoption = true; + continue; + } + if (nonoption) { + nft_options_error(argc, argv, pos); + return false; + } + if (argv[i][1] == 'd' || + argv[i][1] == 'I' || + argv[i][1] == 'f' || + argv[i][1] == 'D' || + !strcmp(argv[i], "--debug") || + !strcmp(argv[i], "--includepath") || + !strcmp(argv[i], "--define") || + !strcmp(argv[i], "--file")) { + skip = true; + continue; } }