Skip to content

Commit 942c56a

Browse files
roopa-prabhudavem330
authored andcommitted
lwtunnel: remove unused but set variable
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 92cd12c commit 942c56a

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

net/core/lwtunnel.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,13 @@ int lwtunnel_valid_encap_type_attr(struct nlattr *attr, int remaining)
162162
struct rtnexthop *rtnh = (struct rtnexthop *)attr;
163163
struct nlattr *nla_entype;
164164
struct nlattr *attrs;
165-
struct nlattr *nla;
166165
u16 encap_type;
167166
int attrlen;
168167

169168
while (rtnh_ok(rtnh, remaining)) {
170169
attrlen = rtnh_attrlen(rtnh);
171170
if (attrlen > 0) {
172171
attrs = rtnh_attrs(rtnh);
173-
nla = nla_find(attrs, attrlen, RTA_ENCAP);
174172
nla_entype = nla_find(attrs, attrlen, RTA_ENCAP_TYPE);
175173

176174
if (nla_entype) {

0 commit comments

Comments
 (0)