[nft PATCH 2/4] xt: Purify enum nft_xt_type

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

 



Remove NFT_XT_MAX from the enum, it is not a valid xt type.

Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 include/statement.h | 2 +-
 src/xt.c            | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/statement.h b/include/statement.h
index 8651fc78892c9..e648fb137b740 100644
--- a/include/statement.h
+++ b/include/statement.h
@@ -255,8 +255,8 @@ enum nft_xt_type {
 	NFT_XT_MATCH = 0,
 	NFT_XT_TARGET,
 	NFT_XT_WATCHER,
-	NFT_XT_MAX
 };
+#define NFT_XT_MAX	(NFT_XT_WATCHER + 1)
 
 struct xtables_match;
 struct xtables_target;
diff --git a/src/xt.c b/src/xt.c
index 7880fa1bc6966..300416a1e8d92 100644
--- a/src/xt.c
+++ b/src/xt.c
@@ -110,8 +110,6 @@ void xt_stmt_xlate(const struct stmt *stmt, struct output_ctx *octx)
 		}
 		xfree(t);
 		break;
-	default:
-		break;
 	}
 
 	xt_xlate_free(xl);
-- 
2.38.0




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

  Powered by Linux