]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
main: Reduce indenting in nft_options_check()
authorPhil Sutter <phil@nwl.cc>
Sat, 2 Dec 2023 10:10:33 +0000 (11:10 +0100)
committerFlorian Westphal <fw@strlen.de>
Sun, 3 Dec 2023 11:26:47 +0000 (12:26 +0100)
No functional change intended.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
src/main.c

index 9485b193cd34dfffa26d487948aa1378d95918d0..c3c7fe23baa37fa0c94ba5ecbfeaaf82b9e1fe38 100644 (file)
@@ -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;
                }
        }