From: "plaisthos (Code Review)" Date: Wed, 25 Sep 2024 14:26:11 +0000 References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="+CMdie4P8Ts="; 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: flichtenheld Cc: openvpn-devel --+CMdie4P8Ts= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/772?usp=3Demail to review the following change. 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 --- M src/openvpn/init.c 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/72/772/1 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: 1 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld Gerrit-MessageType: newchange --+CMdie4P8Ts= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld.

plaisthos would like flichtenheld to review this change.

Vi= ew Change

Remove null check after checking for checking for did_open_tu=
n

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

Change-Id: I9966636163c7dfa208d26f1cadbf5b81937= f3a34
---
M src/openvpn/init.c
1 file changed, 1 insertion(+), 4 d= eletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/=
changes/72/772/1
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= _delay, now);
event_timeout_init(&c-&g= t;c2.route_wakeup_expire, c->options.route_delay + c->options.route_d= elay_window, now);
- = if (c->c1.tuntap)
- {
- tun_standby_init(c->c1.tuntap);
- }
+ tun_standby_init(c-&= gt;c1.tuntap);
}
= else
{

To = view, visit change 772. To unsubscribe, or for help writing mail filters, visit = settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9966636163c7dfa208d26f1cadb= f5b81937f3a34
Gerrit-Change-Number: 772
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newchange
--+CMdie4P8Ts=--