From: "cron2 (Code Review)" Date: Wed, 25 Sep 2024 16:53:29 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <474adb19308c50eeb3e8ce22d3fa7ca71c9ea512-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="MoDV2gzY5AM="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Remove null check after checking for checking for did_open_tun List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --MoDV2gzY5AM= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= plaisthos. ( http://gerrit.openvpn.net/c/openvpn/+/772?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: Remove null check after checking for checking for did_open_= tun ...................................................................... Remove null check after checking for checking for did_open_tun If we indicate that the tun device has been opened the c1.tuntap struct is guaranteed to be defined. This extra null check is something that Coverity flags as we access a do a null check after already accessing fields of tuntap Change-Id: I9966636163c7dfa208d26f1cadbf5b81937f3a34 Signed-off-by: Arne Schwabe Acked-by: Gert Doering Message-Id: <20240925151104.13036-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29= 447.html Signed-off-by: Gert Doering --- M src/openvpn/init.c 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/72/772/2 diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 876edad..ae911a9 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -2546,10 +2546,7 @@ { event_timeout_init(&c->c2.route_wakeup, c->options.route_d= elay, now); event_timeout_init(&c->c2.route_wakeup_expire, c->options.= route_delay + c->options.route_delay_window, now); - if (c->c1.tuntap) - { - tun_standby_init(c->c1.tuntap); - } + tun_standby_init(c->c1.tuntap); } else { -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/772?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I9966636163c7dfa208d26f1cadbf5b81937f3a34 Gerrit-Change-Number: 772 Gerrit-PatchSet: 2 Gerrit-Owner: plaisthos Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --MoDV2gzY5AM= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #2 to the change originally cr= eated by plaisthos.

View Change

The following approvals got outdated= and were removed: Code-Review+2 by cron2

Remove null check after checking for checking for di=
d_open_tun

If we indicate that the tun device has been opened the c1= .tuntap struct
is guaranteed to be defined. This extra null check is som= ething that
Coverity flags as we access a do a null check after already = accessing fields
of tuntap

Change-Id: I9966636163c7dfa208d26f1cad= bf5b81937f3a34
Signed-off-by: Arne Schwabe <arne-openvpn@...1227...&g= t;
Acked-by: Gert Doering <gert@...1296...>
Message-Id: <202= 40925151104.13036-1-gert@...1296...>
URL: https://www.mail-archive.co= m/openvpn-devel@lists.sourceforge.net/msg29447.html
Signed-off-by: Gert = Doering <gert@...1296...>
---
M src/openvpn/init.c
1 file ch= anged, 1 insertion(+), 4 deletions(-)

git pull ssh://gerrit.openv=
pn.net:29418/openvpn refs/changes/72/772/2
diff --git a/src/openvpn=
/init.c b/src/openvpn/init.c
index 876edad..ae911a9 100644<= /span>
--- a/src/openvpn/init.c
+++ b/src/openvpn/= init.c
@@ -2546,10 +2546,7 @@
= {
event_timeout_init(&c->c2.route_w= akeup, c->options.route_delay, now);
ev= ent_timeout_init(&c->c2.route_wakeup_expire, c->options.route_del= ay + c->options.route_delay_window, now);
- if (c->c1.tuntap)
- {

- tun_standby_init(c-&g= t;c1.tuntap);
- = }
+ = tun_standby_init(c->c1.tuntap);
}
else
{

To view, visit change 772. To unsubscribe, or for help wr= iting mail filters, visit se= ttings.

<= div itemscope itemprop=3D"action" itemtype=3D"http://schema.org/ViewAction"= >
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9966636163c7dfa208d26f1cadb= f5b81937f3a34
Gerrit-Change-Number: 772
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--MoDV2gzY5AM=--