From: Razvan Cojocaru <[email protected]>

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

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2220
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Lev Stipakov <[email protected]>

        
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)


_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to