diff options
author | Phil Sutter <phil@nwl.cc> | 2023-12-02 11:10:33 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-12-03 12:26:47 +0100 |
commit | bda378c2d9d561bdda9ce33aedc91bc11b402ac7 (patch) | |
tree | 73ee43d96ede1105f6b9c818fb0643770072b29a | |
parent | a4ce07ef7323465b7315a693395402a6d2b1b1f5 (diff) |
main: Reduce indenting in nft_options_check()
No functional change intended.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
-rw-r--r-- | src/main.c | 31 |
1 files changed, 16 insertions, 15 deletions
@@ -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; } } |