Skip to content

Commit

Permalink
lwtunnel: remove unused but set variable
Browse files Browse the repository at this point in the history
silences the below warning:
net/core/lwtunnel.c: In function ‘lwtunnel_valid_encap_type_attr’:
net/core/lwtunnel.c:165:17: warning: variable ‘nla’ set but not used
[-Wunused-but-set-variable]

Fixes: 9ed5959 ("lwtunnel: fix autoload of lwt modules")
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Roopa Prabhu authored and David S. Miller committed Mar 14, 2017
1 parent 92cd12c commit 942c56a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/core/lwtunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,13 @@ int lwtunnel_valid_encap_type_attr(struct nlattr *attr, int remaining)
struct rtnexthop *rtnh = (struct rtnexthop *)attr;
struct nlattr *nla_entype;
struct nlattr *attrs;
struct nlattr *nla;
u16 encap_type;
int attrlen;

while (rtnh_ok(rtnh, remaining)) {
attrlen = rtnh_attrlen(rtnh);
if (attrlen > 0) {
attrs = rtnh_attrs(rtnh);
nla = nla_find(attrs, attrlen, RTA_ENCAP);
nla_entype = nla_find(attrs, attrlen, RTA_ENCAP_TYPE);

if (nla_entype) {
Expand Down

0 comments on commit 942c56a

Please sign in to comment.