]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed compiler warning in ssl.c
authorDavid Sommerseth <dazo@users.sourceforge.net>
Mon, 16 Aug 2010 18:23:49 +0000 (20:23 +0200)
committerDavid Sommerseth <dazo@users.sourceforge.net>
Thu, 21 Oct 2010 19:27:19 +0000 (21:27 +0200)
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>
ssl.c

diff --git a/ssl.c b/ssl.c
index 1f93732cf32f5dd2ae5dd929a3587fae48322283..e7cb46a8013e592cf8ec35be2ce959ea59785c5c 100644 (file)
--- a/ssl.c
+++ b/ssl.c
@@ -967,7 +967,7 @@ verify_callback (int preverify_ok, X509_STORE_CTX * ctx)
   /* run --tls-verify script */
   if (opt->verify_command)
     {
-      const char *tmp_file;
+      const char *tmp_file = NULL;
       struct gc_arena gc;
       int ret;
 
@@ -976,7 +976,7 @@ verify_callback (int preverify_ok, X509_STORE_CTX * ctx)
       if (opt->verify_export_cert)
         {
           gc = gc_new();
-          if (tmp_file=get_peer_cert(ctx, opt->verify_export_cert,&gc))
+          if ((tmp_file=get_peer_cert(ctx, opt->verify_export_cert,&gc)))
            {
              setenv_str(opt->es, "peer_cert", tmp_file);
            }