代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/qemu 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From cb6048ace290e770b0ec1a6011209192541d3e8a Mon Sep 17 00:00:00 2001
From: AlexChen <alex.chen@huawei.com>
Date: Fri, 30 Oct 2020 10:46:55 +0800
Subject: [PATCH] net/l2tpv3: Remove redundant check in net_init_l2tpv3()
The result has been checked to be NULL before, it cannot be NULL here,
so the check is redundant. Remove it.
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: AlexChen <alex.chen@huawei.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
(cherry-picked from commit d949fe64b0)
---
net/l2tpv3.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/net/l2tpv3.c b/net/l2tpv3.c
index 55fea17c0f..e4d4218db6 100644
--- a/net/l2tpv3.c
+++ b/net/l2tpv3.c
@@ -655,9 +655,8 @@ int net_init_l2tpv3(const Netdev *netdev,
error_setg(errp, "could not bind socket err=%i", errno);
goto outerr;
}
- if (result) {
- freeaddrinfo(result);
- }
+
+ freeaddrinfo(result);
memset(&hints, 0, sizeof(hints));
@@ -686,9 +685,7 @@ int net_init_l2tpv3(const Netdev *netdev,
memcpy(s->dgram_dst, result->ai_addr, result->ai_addrlen);
s->dst_size = result->ai_addrlen;
- if (result) {
- freeaddrinfo(result);
- }
+ freeaddrinfo(result);
if (l2tpv3->has_counter && l2tpv3->counter) {
s->has_counter = true;
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。