From 57113e21a4eb4a1b53c0c1a13671ea152c4186ac Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 21 Aug 2012 13:55:21 +0200 Subject: expect: fix compilation warning in nfexp_nlmsg_build build_mnl.c: In function 'nfexp_nlmsg_build': build_mnl.c:18:11: warning: variable 'l3num' set but not used [-Wunused-but-set-variable] This patch relaxes the checking for the L3PROTO. The kernel will report EINVAL in case that something is missing. Signed-off-by: Pablo Neira Ayuso --- src/expect/build_mnl.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/expect/build_mnl.c b/src/expect/build_mnl.c index 6f33f05..2db6d07 100644 --- a/src/expect/build_mnl.c +++ b/src/expect/build_mnl.c @@ -15,15 +15,6 @@ int nfexp_nlmsg_build(struct nlmsghdr *nlh, const struct nf_expect *exp) { - u_int8_t l3num; - - if (test_bit(ATTR_ORIG_L3PROTO, exp->master.set)) - l3num = exp->master.orig.l3protonum; - else if (test_bit(ATTR_ORIG_L3PROTO, exp->expected.set)) - l3num = exp->expected.orig.l3protonum; - else - return -1; - if (test_bit(ATTR_EXP_EXPECTED, exp->set)) nfct_build_tuple(nlh, &exp->expected.orig, CTA_EXPECT_TUPLE); -- cgit v1.2.3