[nft PATCH 1/2] main: Reduce indenting in nft_options_check()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No functional change intended.

Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 src/main.c | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/src/main.c b/src/main.c
index 9485b193cd34d..c3c7fe23baa37 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;
 		}
 	}
 
-- 
2.41.0





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux