Browse code

Fixed compiler warning in ssl.c

James Yonan noticed a couple of compiler warnings when compiling with
--enable-strict configured. This patch was sent directly to him
for review and got accepted.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>

David Sommerseth authored on 2010/08/17 03:23:49
Showing 1 changed files
... ...
@@ -967,7 +967,7 @@ verify_callback (int preverify_ok, X509_STORE_CTX * ctx)
967 967
   /* run --tls-verify script */
968 968
   if (opt->verify_command)
969 969
     {
970
-      const char *tmp_file;
970
+      const char *tmp_file = NULL;
971 971
       struct gc_arena gc;
972 972
       int ret;
973 973
 
... ...
@@ -976,7 +976,7 @@ verify_callback (int preverify_ok, X509_STORE_CTX * ctx)
976 976
       if (opt->verify_export_cert)
977 977
         {
978 978
           gc = gc_new();
979
-          if (tmp_file=get_peer_cert(ctx, opt->verify_export_cert,&gc))
979
+          if ((tmp_file=get_peer_cert(ctx, opt->verify_export_cert,&gc)))
980 980
            {
981 981
              setenv_str(opt->es, "peer_cert", tmp_file);
982 982
            }