From 5029136028bff1747860ed770994b8f494c042fc Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 13 Dec 2023 23:49:53 +0100 Subject: expr: Call expr_ops::set with legal types only Having the new expr_ops::nftnl_max_attr field in place, the valid range of attribute type values is known now. Reject illegal ones upfront. Consequently drop the default case from callbacks' switches which handle all supported attributes. Signed-off-by: Phil Sutter --- src/expr/flow_offload.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/expr/flow_offload.c') diff --git a/src/expr/flow_offload.c b/src/expr/flow_offload.c index f604712..9ab068d 100644 --- a/src/expr/flow_offload.c +++ b/src/expr/flow_offload.c @@ -25,8 +25,6 @@ static int nftnl_expr_flow_set(struct nftnl_expr *e, uint16_t type, if (!flow->table_name) return -1; break; - default: - return -1; } return 0; } -- cgit v1.2.3