diff mbox

[2/3,libnftnl] expr: Fix lookup builder

Message ID 20160810151205.24975-2-carlosfg@riseup.net
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Carlos Falgueras García Aug. 10, 2016, 3:12 p.m. UTC
Deleted wrong braces that cause unwanted behaviour.

Signed-off-by: Carlos Falgueras García <carlosfg@riseup.net>
---
 src/expr/lookup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Pablo Neira Ayuso Aug. 10, 2016, 4:48 p.m. UTC | #1
On Wed, Aug 10, 2016 at 05:12:04PM +0200, Carlos Falgueras García wrote:
> Deleted wrong braces that cause unwanted behaviour.

Also applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pablo Neira Ayuso Aug. 11, 2016, 11:52 p.m. UTC | #2
On Wed, Aug 10, 2016 at 05:12:04PM +0200, Carlos Falgueras García wrote:
> Deleted wrong braces that cause unwanted behaviour.

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/expr/lookup.c b/src/expr/lookup.c
index 57612d1..60da653 100644
--- a/src/expr/lookup.c
+++ b/src/expr/lookup.c
@@ -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