Gert Doering has submitted this change. ( 
https://gerrit.openvpn.net/c/openvpn/+/2220?usp=email )

Change subject: ssl: fix MSVC C4047 in key_method_2_read()
......................................................................

ssl: fix MSVC C4047 in key_method_2_read()

Assigning strstr()'s result to the bool remote_usescomp warns under
MSVC and fails the /WX build. Compare against NULL.

Change-Id: I9a78e57cff805e1896d79a17fbcd4132c5a4b1b3
Signed-off-by: Razvan Cojocaru <[email protected]>
Acked-by: Lev Stipakov <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2220
Message-Id: <[email protected]>
URL: 
https://www.mail-archive.com/[email protected]/msg41689.html
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpn/ssl.c
1 file changed, 1 insertion(+), 1 deletion(-)




diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index e06659a..d5ae13d 100644
--- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c
@@ -2409,7 +2409,7 @@

     free(multi->remote_ciphername);
     multi->remote_ciphername = options_string_extract_option(options, 
"cipher", NULL);
-    multi->remote_usescomp = strstr(options, ",comp-lzo,");
+    multi->remote_usescomp = (strstr(options, ",comp-lzo,") != NULL);

     /* In OCC we send '[null-cipher]' instead 'none' */
     if (multi->remote_ciphername && strcmp(multi->remote_ciphername, 
"[null-cipher]") == 0)

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

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9a78e57cff805e1896d79a17fbcd4132c5a4b1b3
Gerrit-Change-Number: 2220
Gerrit-PatchSet: 2
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Lev Stipakov <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to