]> git.ipfire.org Git - thirdparty/libnftnl.git/commitdiff
expr: Fix lookup builder
authorCarlos Falgueras García <carlosfg@riseup.net>
Wed, 10 Aug 2016 12:07:05 +0000 (14:07 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 10 Aug 2016 12:14:32 +0000 (14:14 +0200)
Deleted wrong braces that cause unwanted behaviour.

Signed-off-by: Carlos Falgueras García <carlosfg@riseup.net>
src/expr/lookup.c

index 97478c25ffef3e1adeeafd37479a01ec29e22fb6..639470dad1373dff386036c480d1ddc0efdfdd8b 100644 (file)
@@ -122,12 +122,11 @@ nftnl_expr_lookup_build(struct nlmsghdr *nlh, const struct nftnl_expr *e)
                mnl_attr_put_u32(nlh, NFTA_LOOKUP_DREG, htonl(lookup->dreg));
        if (e->flags & (1 << NFTNL_EXPR_LOOKUP_SET))
                mnl_attr_put_strz(nlh, NFTA_LOOKUP_SET, lookup->set_name);
-       if (e->flags & (1 << NFTNL_EXPR_LOOKUP_SET_ID)) {
+       if (e->flags & (1 << NFTNL_EXPR_LOOKUP_SET_ID))
                mnl_attr_put_u32(nlh, NFTA_LOOKUP_SET_ID,
                                 htonl(lookup->set_id));
        if (e->flags & (1 << NFTNL_EXPR_LOOKUP_FLAGS))
                mnl_attr_put_u32(nlh, NFTA_LOOKUP_FLAGS, htonl(lookup->flags));
-       }
 }
 
 static int