From 72931553828af0ce85f0562b9ff8ec7f4d28e050 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Fri, 8 Feb 2019 17:02:22 +0100 Subject: src: expr: add expression etype Temporary kludge to remove all the expr->ops->type == ... patterns. Followup patch will remove expr->ops, and make expr_ops() lookup the correct expr_ops struct instead to reduce struct expr size. Signed-off-by: Florian Westphal --- src/tcpopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tcpopt.c') diff --git a/src/tcpopt.c b/src/tcpopt.c index 66f021f9..52c8c07c 100644 --- a/src/tcpopt.c +++ b/src/tcpopt.c @@ -197,7 +197,7 @@ void tcpopt_init_raw(struct expr *expr, uint8_t type, unsigned int offset, const struct proto_hdr_template *tmpl; unsigned int i, off; - assert(expr->ops->type == EXPR_EXTHDR); + assert(expr->etype == EXPR_EXTHDR); expr->len = len; expr->exthdr.flags = flags; -- cgit v1.2.3