diff options
Diffstat (limited to 'src/exthdr.c')
-rw-r--r-- | src/exthdr.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/exthdr.c b/src/exthdr.c index 22a08b0c..00d338f0 100644 --- a/src/exthdr.c +++ b/src/exthdr.c @@ -165,9 +165,7 @@ static struct expr *exthdr_expr_parse_udata(const struct nftnl_udata *attr) static unsigned int expr_exthdr_type(const struct exthdr_desc *desc, const struct proto_hdr_template *tmpl) { - unsigned int offset = (unsigned int)(tmpl - &desc->templates[0]); - - return offset / sizeof(*tmpl); + return (unsigned int)(tmpl - &desc->templates[0]); } static int exthdr_expr_build_udata(struct nftnl_udata_buf *udbuf, |