From 5b88feeb7f81905df0cffc5d7cb372c98cfa949e Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Wed, 17 Aug 2022 12:08:31 -0500 Subject: nat: simplify per-protocol code by using an array rather than using obfuscated macro hacery, simplify the per-protocol data management by directly using an array of NAT protocol types. Type: refactor Signed-off-by: Jon Loeliger Change-Id: I6fe987556ac9f402f8d490da0740e2b91440304c --- src/plugins/nat/lib/nat_proto.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/nat/lib') diff --git a/src/plugins/nat/lib/nat_proto.h b/src/plugins/nat/lib/nat_proto.h index 9b20d9a71d1..4b57b994e22 100644 --- a/src/plugins/nat/lib/nat_proto.h +++ b/src/plugins/nat/lib/nat_proto.h @@ -28,6 +28,7 @@ typedef enum #define _(N, i, n, s) NAT_PROTOCOL_##N = i, foreach_nat_protocol #undef _ + NAT_N_PROTOCOLS } nat_protocol_t; always_inline nat_protocol_t -- cgit 1.2.3-korg