提交 c72824bc 编写于 作者: K Kuniyuki Iwashima 提交者: Jialin Zhang

raw: Fix mixed declarations error in raw_icmp_error().

mainline inclusion
from mainline-v6.0-rc1
commit 5da39e31
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6ECEK
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5da39e31b1b0eb62b8ed369ad9615da850239e9e

--------------------------------

The trailing semicolon causes a compiler error, so let's remove it.

net/ipv4/raw.c: In function ‘raw_icmp_error’:
net/ipv4/raw.c:266:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  266 |  struct hlist_nulls_head *hlist;
      |  ^~~~~~

Fixes: ba44f818 ("raw: use more conventional iterators")
Signed-off-by: NKuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NZiyang Xuan <william.xuanziyang@huawei.com>
Reviewed-by: NYue Haibing <yuehaibing@huawei.com>
Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
上级 f60130c3
...@@ -262,7 +262,7 @@ static void raw_err(struct sock *sk, struct sk_buff *skb, u32 info) ...@@ -262,7 +262,7 @@ static void raw_err(struct sock *sk, struct sk_buff *skb, u32 info)
void raw_icmp_error(struct sk_buff *skb, int protocol, u32 info) void raw_icmp_error(struct sk_buff *skb, int protocol, u32 info)
{ {
struct net *net = dev_net(skb->dev);; struct net *net = dev_net(skb->dev);
struct hlist_nulls_head *hlist; struct hlist_nulls_head *hlist;
struct hlist_nulls_node *hnode; struct hlist_nulls_node *hnode;
int dif = skb->dev->ifindex; int dif = skb->dev->ifindex;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册