Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1340387 > unrolled thread

[PATCH] netfilter: xt_osf: remove unused variable

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2016-02-23 09:20 +0100
Last post2016-02-29 14:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] netfilter: xt_osf: remove unused variable Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-02-23 09:20 +0100
    Re: [PATCH] netfilter: xt_osf: remove unused variable Pablo Neira Ayuso <pablo@netfilter.org> - 2016-02-29 14:10 +0100

#1340387 — [PATCH] netfilter: xt_osf: remove unused variable

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2016-02-23 09:20 +0100
Subject[PATCH] netfilter: xt_osf: remove unused variable
Message-ID<r5gmm-2Az-21@gated-at.bofh.it>
While building with W=1 we got the warning:
net/netfilter/xt_osf.c:265:9: warning: variable 'loop_cont' set but not used

The local variable loop_cont was only initialized and then assigned a
value but was never used or checked after that.
While removing the variable, the case of OSFOPT_TS was not removed so
that it will serve as a reminder to us that we can do something in that
particular case.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---
 net/netfilter/xt_osf.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/netfilter/xt_osf.c b/net/netfilter/xt_osf.c
index 4e3c3af..2455b69 100644
--- a/net/netfilter/xt_osf.c
+++ b/net/netfilter/xt_osf.c
@@ -262,7 +262,6 @@ xt_osf_match_packet(const struct sk_buff *skb, struct xt_action_param *p)
 			if (f->opt[optnum].kind == (*optp)) {
 				__u32 len = f->opt[optnum].length;
 				const __u8 *optend = optp + len;
-				int loop_cont = 0;
 
 				fmatch = FMATCH_OK;
 
@@ -275,7 +274,6 @@ xt_osf_match_packet(const struct sk_buff *skb, struct xt_action_param *p)
 					mss = ntohs((__force __be16)mss);
 					break;
 				case OSFOPT_TS:
-					loop_cont = 1;
 					break;
 				}
 
-- 
1.9.1

[toc] | [next] | [standalone]


#1345790

FromPablo Neira Ayuso <pablo@netfilter.org>
Date2016-02-29 14:10 +0100
Message-ID<r7vKj-3rD-25@gated-at.bofh.it>
In reply to#1340387
On Tue, Feb 23, 2016 at 01:40:10PM +0530, Sudip Mukherjee wrote:
> While building with W=1 we got the warning:
> net/netfilter/xt_osf.c:265:9: warning: variable 'loop_cont' set but not used
> 
> The local variable loop_cont was only initialized and then assigned a
> value but was never used or checked after that.
> While removing the variable, the case of OSFOPT_TS was not removed so
> that it will serve as a reminder to us that we can do something in that
> particular case.

Applied, thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web