From: "cron2 (Code Review)" Date: Mon, 11 May 2026 17:13:00 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <2c54ab7c6a28c6d2027e056c300f9e8f49fc4652-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="bE5vx0mMJrE="; 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: flichtenheld , plaisthos Cc: openvpn-devel --bE5vx0mMJrE= 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= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1677?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 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 Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1677 Message-Id: <20260508153458.13848-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36= 867.html Signed-off-by: Gert Doering --- M src/openvpn/tun.c 1 file changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/77/1677/2 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: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I0aeb4583707a80592ec2577fbb060f7fbcb73e48 Gerrit-Change-Number: 1677 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --bE5vx0mMJrE= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #2 to the change originally created by flichtenhel= d.

View Change

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

tun: Remove one useless if check
The condition was already checked in an outer if check.

Identif= ied by cppcheck.

Change-Id: I0aeb4583707a80592ec2577fbb060f7fbcb73e4= 8
Signed-off-by: Frank Lichtenheld <frank@...2641...>
Acked-by:= Gert Doering <gert@...1296...>
Gerrit URL: https://gerrit.openvpn= .net/c/openvpn/+/1677
Message-Id: <20260508153458.13848-1-gert@...1826...= 6...>
URL: https://www.mail-archive.com/openvpn-devel@...1768...= ge.net/msg36867.html
Signed-off-by: Gert Doering <gert@...1296...>=
---
M src/openvpn/tun.c
1 file changed, 3 insertions(+), 6 deleti= ons(-)

git pull ssh://gerrit.openvpn.net:29418/o=
penvpn refs/changes/77/1677/2
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 DRIVE= R_DCO)
+ c= onst char *last_sep =3D strrchr(dev_if->device_interface, '\\');=
+ if (!la= st_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_STRING) !=3D 0= )
- {
- cont= inue;
- = }
+ co= ntinue;
}

= path =3D dev_if->device_interface;

To view, visit change 1677. To unsubscribe, or for help writing mail = filters, visit s= ettings.

=
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I0aeb4583707a80592ec2577fbb0= 60f7fbcb73e48
Gerrit-Change-Number: 1677
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --bE5vx0mMJrE=--