From: "flichtenheld (Code Review)" Date: Fri, 8 May 2026 11:27:33 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <144483b0372b193df493250e6b1d522979dfeb04-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="It9AF5DvWFE="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: tun: Remove one useless if check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --It9AF5DvWFE= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1677?usp=3Demail to review the following change. Change subject: tun: Remove one useless if check ...................................................................... tun: Remove one useless if check The condition was already checked in an outer if check. Identified by cppcheck. Change-Id: I0aeb4583707a80592ec2577fbb060f7fbcb73e48 Signed-off-by: Frank Lichtenheld --- M src/openvpn/tun.c 1 file changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/77/1677/1 diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index f46802f..e7193d8 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -5772,13 +5772,10 @@ continue; } - if (tt->backend_driver =3D=3D DRIVER_DCO) + const char *last_sep =3D strrchr(dev_if->device_interface, '\\= '); + if (!last_sep || strcmp(last_sep + 1, DCO_WIN_REFERENCE_STRING= ) !=3D 0) { - char *last_sep =3D strrchr(dev_if->device_interface, '\\'); - if (!last_sep || strcmp(last_sep + 1, DCO_WIN_REFERENCE_ST= RING) !=3D 0) - { - continue; - } + continue; } path =3D dev_if->device_interface; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1677?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I0aeb4583707a80592ec2577fbb060f7fbcb73e48 Gerrit-Change-Number: 1677 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --It9AF5DvWFE= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

V= iew Change

tun: Remove one useless if check

The= condition was already checked in an outer if check.

Identified by c= ppcheck.

Change-Id: I0aeb4583707a80592ec2577fbb060f7fbcb73e48
Sig= ned-off-by: Frank Lichtenheld <frank@...2641...>
---
M src/open= vpn/tun.c
1 file changed, 3 insertions(+), 6 deletions(-)

<= pre class=3D"blocks" style=3D"font-family: monospace,monospace; white-space= : pre-wrap;">git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/7= 7/1677/1
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c<=
br>index f46802f..e7193d8 100644
--- a/src/openvpn/tu= n.c
+++ b/src/openvpn/tun.c
@@ -5772,13 +57= 72,10 @@
continue;
= }

- if (tt->backend_driver =3D=3D DRIVER_DCO)
+ const char *last_sep = =3D strrchr(dev_if->device_interface, '\\');
+ if (!last_sep || strcmp(las= t_sep + 1, DCO_WIN_REFERENCE_STRING) !=3D 0)
{=
- char = *last_sep =3D strrchr(dev_if->device_interface, '\\');- if (!last_sep |= | strcmp(last_sep + 1, DCO_WIN_REFERENCE_STRING) !=3D 0)
- {
- continue;
- }
+ continue;
<= span> }

path =3D= dev_if->device_interface;

To view, = visit ch= ange 1677. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I0aeb4583707a80592ec2577fbb0= 60f7fbcb73e48
Gerrit-Change-Number: 1677
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
= --It9AF5DvWFE=--