[XS] Change in openvpn[master]: tun: Remove one useless if check

"cron2 (Code Review)" <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <2c54ab7c6a28c6d2027e056c300f9e8f49fc4652-EmailReplacePatchSet-HTML@gerrit.openvpn.net>
cron2 has uploaded a new patch set (#2) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1677?usp=email )

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 <[email protected]>
Acked-by: Gert Doering <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1677
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg36867.html
Signed-off-by: Gert Doering <[email protected]>
---
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 == DRIVER_DCO)
+            const char *last_sep = strrchr(dev_if->device_interface, '\\');
+            if (!last_sep || strcmp(last_sep + 1, DCO_WIN_REFERENCE_STRING) != 0)
             {
-                char *last_sep = strrchr(dev_if->device_interface, '\\');
-                if (!last_sep || strcmp(last_sep + 1, DCO_WIN_REFERENCE_STRING) != 0)
-                {
-                    continue;
-                }
+                continue;
             }
 
             path = dev_if->device_interface;

-- 
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1677?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I0aeb4583707a80592ec2577fbb060f7fbcb73e48
Gerrit-Change-Number: 1677
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: cron2 <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.