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

"cron2 (Code Review)" <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <[email protected]>
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1677?usp=email )

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(-)




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: merged
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.